Jump to the End
Medium
You are given an integer array in which you're originally positioned at index 0. Each number in the array represents the maximum jump distance from the current index. Determine if it's possible to reach the end of the array.
Example 1:
Input: nums = [3, 2, 0, 2, 5]
Output: True
Example 2:
Input: nums = [2, 1, 0, 3]
Output: False
Constraints:
- There is at least one element in
nums. - All integers in
numsare non-negative integers.