Problem
You get an array of non-negative integers nums. You start at index 0. The value nums[i] is the longest jump that you can make from index i.
From index i, you can move to any index from i + 1 to i + nums[i]. Return true if you can reach the last index. Otherwise, return false.
Example 1
- Input:
- nums = [1,3,0,0,2]
- Output:
- true
- Explanation:
- Jump 1 step from index 0 to index 1. Then jump 3 steps from index 1 to the last index.
Example 2
- Input:
- nums = [2,1,0,4]
- Output:
- false
- Explanation:
- Each path stops at index 2, because
nums[2]is 0. You cannot reach index 3.
Constraints
- 1 <= nums.length <= 10^4
- 0 <= nums[i] <= 10^5
SysRound wrote this statement. A reference solution checks every example.
Related questions
Continue with questions that share topics or the same question type.
- Jump Game II
Coding · Array · Dynamic Programming · Greedy
- Best Time to Buy and Sell Stock II
Coding · Array · Dynamic Programming · Greedy
- Minimum Number of Refueling Stops
Coding · Array · Dynamic Programming · Greedy
- Non-overlapping Intervals
Coding · Array · Dynamic Programming · Greedy
Sources · 2 references
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Amazon
Leetcode 55. Jump Game
Reported Jun 2, 2026 · 3 source reports
JUNIOR, MID_LEVEL, SENIOR
Source snapshot: Nov 12, 2026
View source
LeetCode company tags · 2 records
Meta
Jump Game
Reported date not specified · Source window: 30d
Source snapshot: Oct 20, 2026
Source frequency score: 72.1. This is not an interview probability.
View sourceMicrosoft
Jump Game
Reported date not specified · Source window: 30d
Source snapshot: Oct 20, 2026
Source frequency score: 61.5. This is not an interview probability.
View source