Skip to content

Commit 4ca3dbe

Browse files
authored
Merge pull request rachitiitr#44 from tatsujoestar/patch-1
fix: changes made for formatting consistency
2 parents 7147d16 + 522f361 commit 4ca3dbe

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)