Jump Game II
Try to solve the Jump Game II problem.
We'll cover the following
Statement
In a single player jump game, the player starts at one end of a series of squares and aims to reach the last square.
At each turn, the player can take up to
For example, if the value of the current square is
You’ve been provided with the nums
integer array, representing the series of squares.
You’re initially positioned at the first index of the array. Find the minimum number of jumps needed to reach the last index of the array.
You may assume that you can always reach the last index.
Constraints
nums.length
nums[i]
Examples
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy