class Solution: # @param A, a list of integers # @return a boolean def canJump(self, A): crt=-1 for i in range(len(A)-1): crt=max(crt-1,A[i]) if crt==0: return False return True
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment