Exercises/#59 Jump Game II
#59

Jump Game II

Medium🧩 Dynamic Programming
90 XP

Problem

Given an array where nums[i] is the max jump from position i, return the minimum number of jumps to reach the last index.

Examples

Input: nums=[2,3,1,1,4]
Output: 2 (jump from 0β†’1β†’4)

Input: nums=[2,3,0,1,4]
Output: 2
dynamic-programminggreedy
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

59 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features