From tail to head, check if current position could reach the closest to current position that reach all the way to the end.

```
public class Solution {
public boolean canJump(int[] nums) {
boolean dp = true;
int last = nums.length - 1;
for(int i = last; i >= 0; i--){
if(nums[i] >= last - i){
dp = true;
last = i;
}else
dp = false;
}
return dp;
}
}
```