Jump Game
Example
class Solution:
# @param A, a list of integers
# @return a boolean
def canJump(self, A):
n = len(A)
F = [False for i in range(n)]
F[0] = True
for i in range(1, n):
for j in range(0, i):
if F[j] and A[j] + j >= i:
F[i] = True
break
return F[-1]Last updated