We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cbacca commit c47039eCopy full SHA for c47039e
solution/0200-0299/0200.Number of Islands/Solution2.cpp
@@ -5,7 +5,7 @@ class Solution {
5
int n = grid[0].size();
6
int ans = 0;
7
int dirs[5] = {-1, 0, 1, 0, -1};
8
- function<void(int, int)> bfs = [&](int i, int j) {
+ auto bfs = [&](int i, int j) -> void {
9
grid[i][j] = '0';
10
queue<pair<int, int>> q;
11
q.push({i, j});
0 commit comments