Medium · Arrays
Jump game
Given an array nums where nums[i] is the maximum jump length from index i, start at index 0 and return true if you can reach the last index, or false otherwise.
Examples
Example 1
[2,3,1,1,4] → trueOutput: reachable: true
Example 2
[3,2,1,0,4] → falseOutput: stuck: false
Rebuild it in the studio
Read every interview problem free. Ten rooms need no account. A token opens a problem in full — Pro never counts.