Skip to content

Commit 0d75b13

Browse files
committed
Re-solve "Jump Game"
1 parent 085f6b7 commit 0d75b13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jump_game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ def canJump(self, nums: list[int]) -> bool:
77
return False
88
max_reach = max(max_reach, i + x)
99

10-
return len(nums) - 1 <= max_reach
10+
return max_reach >= len(nums) - 1

0 commit comments

Comments
 (0)