We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 304e968 commit 054bdd5Copy full SHA for 054bdd5
C++/maximum-trailing-zeros-in-a-cornered-path.cpp
@@ -41,7 +41,7 @@ class Solution {
41
}
42
array<int, 2> up = {0, 0};
43
for (int i = 0; i < size(grid); ++i) {
44
- auto right = j ? sub(left[i].back(), left[i][j - 1]) : left[i].back();
+ const auto& right = j ? sub(left[i].back(), left[i][j - 1]) : left[i].back();
45
result = max({result, count(add(left[i][j], up)), count(add(right, up))});
46
up = add(up, factor(grid[i][j]));
47
const auto& down = sub(total, up);
0 commit comments