Array where nums[i] is the max jump length from index i. Can you reach the last index starting from index ? Example: [2,3,1,1,4]. From , jump to or . From , jump up to positions.
You can reach index .
Example: [3,2,1,0,4]. From , jump to , , or .
But all paths lead to index where you are stuck. What is the greedy approach? Constraint: means time using space greedy beats backtracking.