Problem
Determine whether you can reach the final index.
Example 1
Input: nums = [2,3,1,1,4]
Output: true
Constraints
- 1 <= nums.length <= 10^4
Notes
- Focus on the underlying greedy pattern.
- Write the cleanest correct solution before optimizing further.
- Hidden tests cover larger edge cases than the visible examples.