Skip to content

Commit 96cda68

Browse files
authored
Update minimize-hamming-distance-after-swap-operations.cpp
1 parent b3f82e8 commit 96cda68

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

C++/minimize-hamming-distance-after-swap-operations.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ class Solution {
3030
}
3131

3232
private:
33-
void iter_flood_fill(
34-
const vector<unordered_set<int>>& adj,
35-
int node,
36-
vector<bool> *lookup,
37-
vector<int> *idxs) {
38-
33+
void iter_flood_fill(const vector<unordered_set<int>>& adj,
34+
int node,
35+
vector<bool> *lookup, vector<int> *idxs) {
3936
vector<int> stk = {node};
4037
while (!empty(stk)) {
4138
auto node = stk.back(); stk.pop_back();
@@ -44,7 +41,6 @@ class Solution {
4441
}
4542
(*lookup)[node] = true;
4643
(*idxs).emplace_back(node);
47-
4844
for (const auto& child : adj[node]) {
4945
stk.emplace_back(child);
5046
}

0 commit comments

Comments
 (0)