Skip to content

Commit 8cbacca

Browse files
authored
Update Solution2.cpp
Removed an unnecessary directions declaration: vector<int> dirs = {-1, 0, 1, 0, -1};
1 parent bbbf305 commit 8cbacca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

solution/0200-0299/0200.Number of Islands/Solution2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class Solution {
99
grid[i][j] = '0';
1010
queue<pair<int, int>> q;
1111
q.push({i, j});
12-
vector<int> dirs = {-1, 0, 1, 0, -1};
1312
while (!q.empty()) {
1413
auto [a, b] = q.front();
1514
q.pop();
@@ -33,4 +32,4 @@ class Solution {
3332
}
3433
return ans;
3534
}
36-
};
35+
};

0 commit comments

Comments
 (0)