Skip to content

Commit fa4233e

Browse files
committed
55
1 parent e0a87eb commit fa4233e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

leetcode/55. Jump Game/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ Or
6161
class Solution {
6262
public:
6363
bool canJump(vector<int>& A) {
64-
int last = 0;
65-
for (int i = 0; i <= last; ++i) {
64+
for (int i = 0, last = 0; i <= last; ++i) {
6665
last = max(last, i + A[i]);
6766
if (last >= A.size() - 1) return true;
6867
}

0 commit comments

Comments
 (0)