Skip to content

Commit b7e37d9

Browse files
committed
Update number-of-connected-components-in-an-undirected-graph.cpp
1 parent 5f741b8 commit b7e37d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/number-of-connected-components-in-an-undirected-graph.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Solution {
1818
iota(set_.begin(), set_.end(), 0);
1919
}
2020

21-
int find_set(int x) {
21+
int find_set(const int x) {
2222
if (set_[x] != x) {
2323
set_[x] = find_set(set_[x]); // Path compression.
2424
}

0 commit comments

Comments
 (0)