Jump Game
Examples
Example 1:
Input: nums = [1,2,0,1,0]
Output: true
Explanation:
Example 2:
Input: nums = [1,2,1,0,1]
Output: false
Example 1:
Input: nums = [1,2,0,1,0]
Output: true
Explanation:
Example 2:
Input: nums = [1,2,1,0,1]
Output: false
You are given an integer array nums where each element nums[i] indicates your maximum jump length at that position.
Return true if you can reach the last index starting from index 0, or false otherwise.
First jump from index 0 to 1, then from index 1 to 3, and lastly from index 3 to 4.
1 <= nums.length <= 10000 <= nums[i] <= 1000