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.
Constraints: 1 ≤ nums.length ≤ 10⁴ · 0 ≤ nums[i] ≤ 10⁵
What does it mean for a position to be “reachable”? Your first instinct might be to try every possible path — start at index 0, pick a jump, land somewhere, pick another jump. If ANY sequence of jumps gets you to the end, the answer is true.
That sounds manageable. After all, arrays are just numbered boxes — how hard can it be to hop across a handful of them? Let's find out. Each value below is your maximum jump length at that position. Tap the stones to jump from index 0 to the last index.