Coding Challenge

Jump Game

Medium
greedyarray

Determine if you can reach the last index.

Each array value gives the maximum jump length from that position. Return true if you can reach the final index.

Examples

Input: nums = [2,3,1,1,4]

Output: true

Constraints

  • 1 <= nums.length

Preparing your coding workspace...