We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f361489 commit e09ee16Copy full SHA for e09ee16
55-Jump-Game.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def canJump(self, nums: List[int]) -> bool:
3
+ goal = len(nums) -1
4
+
5
+ for i in range(len(nums) - 2, -1, -1):
6
+ if i + nums[i] >= goal:
7
+ goal = i
8
+ return True if goal == 0 else False
0 commit comments