55. Jump Game
- shift the goal forwards, see whether the current index can reach the most recent goal or not
class Solution(object):
def canJump(self, nums):
goal = len(nums) - 1
for i in range(len(nums) - 1 , -1, -1):
if i + nums[i] >= goal:
goal = i
return True if goal == 0 else False