We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45f0bc9 commit 2d5a196Copy full SHA for 2d5a196
jump-game/printjin-gmailcom.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def canJump(self, nums):
3
+ max_reach = 0
4
+ for i in range(len(nums)):
5
+ if i > max_reach:
6
+ return False
7
+ max_reach = max(max_reach, i + nums[i])
8
+ return True
0 commit comments