Skip to content

Commit 054bdd5

Browse files
authored
Update maximum-trailing-zeros-in-a-cornered-path.cpp
1 parent 304e968 commit 054bdd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/maximum-trailing-zeros-in-a-cornered-path.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Solution {
4141
}
4242
array<int, 2> up = {0, 0};
4343
for (int i = 0; i < size(grid); ++i) {
44-
auto right = j ? sub(left[i].back(), left[i][j - 1]) : left[i].back();
44+
const auto& right = j ? sub(left[i].back(), left[i][j - 1]) : left[i].back();
4545
result = max({result, count(add(left[i][j], up)), count(add(right, up))});
4646
up = add(up, factor(grid[i][j]));
4747
const auto& down = sub(total, up);

0 commit comments

Comments
 (0)