Skip to content

Commit

Permalink
Re-solve "Jump Game"
Browse files Browse the repository at this point in the history
  • Loading branch information
lancelote committed Jul 16, 2024
1 parent 085f6b7 commit 0d75b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jump_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ def canJump(self, nums: list[int]) -> bool:
return False
max_reach = max(max_reach, i + x)

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

0 comments on commit 0d75b13

Please sign in to comment.