Beats 81.08%

```
def canJump(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
n = len(nums)
h = []
for i in range(n):
h.append(i+nums[i])
i = 0
r = nums[0]
while r < n:
m = max(h[i:r+1])
if m > r:
i = r+1
r = m
else:
break
if r >= n-1:
return True
return False
```