Skip to content

Commit abef393

Browse files
committed
Update pascals-triangle-ii.cpp
1 parent f3f819c commit abef393

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/pascals-triangle-ii.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Solution {
88
for (int i = 0; i < result.size(); ++i) {
99
int prev_result = result[0] = 1;
1010
for (int j = 1; j <= i; ++j) {
11-
int tmp = result[j];
11+
const int tmp = result[j];
1212
result[j] += prev_result;
1313
prev_result = tmp;
1414
}

0 commit comments

Comments
 (0)