Practice Jump Game
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Return true if you can reach the last index, or false otherwise.
Source: Jump Game on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [2,3,1,1,4]
Output
true
# Example 2
Input
nums = [3,2,1,0,4]
Output
false
Constraints
1 <= nums.length <= 10^4
0 <= nums[i] <= 10^5
Related LeetCode Problems
Practice more problems similar to Jump Game.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.