Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Jump Game
Medium
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Given an array of non-negative integers where each element represents maximum jump length, determine if you can reach the last index.
Sample Input:
[2,3,1,1,4]
Sample Output:
true
Hints
Hint 1
Track the farthest position you can reach
Hint 2
If current position exceeds farthest reachable, return false
Hint 3
If farthest reachable reaches or exceeds last index, return true
Code Editor
Reset
Run
Save
Loading...