55. Jump Game
Practice Jump Game for free on NudgeCode: Medium, Dynamic Programming pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
You start at index 0 of nums. nums[i] is the farthest you can move forward from index i in one move. Return whether you can reach the last index.
Example
nums = [2,3,1,1,4] -> true
nums = [3,2,1,0,4] -> false (every path gets stuck on index 3)
Constraints
- 1 <= nums.length <= 10^4
- 0 <= nums[i] <= 10^5