Skip to content

Commit 522f361

Browse files
authored
fix: changes made for formatting consistency
1 parent ac4d499 commit 522f361

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Famous-Coding-Interview-Problems/JumpGame2.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ class Solution {
77
int maxIndexReachable = nums[0];
88
int ans = 1, lim = nums[0];
99

10-
for(int i = 1; i < n; i++)
11-
{
10+
for(int i = 1; i < n; i++) {
1211
if(i > lim) {
1312
ans++;
1413
lim = maxIndexReachable;
1514
}
1615
maxIndexReachable = max(maxIndexReachable, i+nums[i]);
1716
}
18-
1917
return ans;
2018
}
2119
};

0 commit comments

Comments
 (0)