Skip to content

Commit c80031b

Browse files
authored
Update count-sub-islands.cpp
1 parent e366da3 commit c80031b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/count-sub-islands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class Solution {
2828
}
2929
(*grid2)[i][j] = 0;
3030
int result = grid1[i][j];
31-
for (const auto& [ni, nj] : directions) {
32-
result &= dfs(grid1, grid2, i + ni, j + nj);
31+
for (const auto& [di, dj] : directions) {
32+
result &= dfs(grid1, grid2, i + di, j + dj);
3333
}
3434
return result;
3535
}

0 commit comments

Comments
 (0)