diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2023-03-01 16:56:27 +0100 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2023-03-01 16:56:27 +0100 |
| commit | b15088d04aac27a3ef94cf79e68d681d735b1bbc (patch) | |
| tree | 96ba00e474790acd62d10a5d1ae5699e42cf6b4c /datastructures/unionFind2.cpp | |
| parent | d8eefacaebee4e08aa92ae507d49079d90a93580 (diff) | |
reformatted empty lines
Diffstat (limited to 'datastructures/unionFind2.cpp')
| -rw-r--r-- | datastructures/unionFind2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/datastructures/unionFind2.cpp b/datastructures/unionFind2.cpp index b86c8e0..5362c4d 100644 --- a/datastructures/unionFind2.cpp +++ b/datastructures/unionFind2.cpp @@ -9,7 +9,7 @@ int findSet(int i) { uf[i] = findSet(uf[i]); //Path-Compression return uf[i]; } - + void linkSets(int i, int j) { //Take |uf[i]|, where i must be a root, to get the size //of the subset @@ -19,7 +19,7 @@ void linkSets(int i, int j) { uf[i] += uf[j]; uf[j] = i; } } - + void unionSets(int i, int j) { if(findSet(i) != findSet(j)) linkSets(findSet(i),findSet(j)); } |
