Update data_structures/dsu_union_rank.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Aayush Vyas
2021-09-07 07:25:17 +05:30
committed by GitHub
parent 4cb3596be6
commit c40b4709a2

View File

@@ -139,7 +139,7 @@ static void test1() {
d.unionSet(5,7);
d.unionSet(9,10);
d.unionSet(2,10);
///keeping track of the changes using parent pointers
// keeping track of the changes using parent pointers
vector<uint64_t> ans = {7,5};
for(uint64_t i=0;i<ans.size();i++){
assert(d.getParents(7).at(i) == ans[i]); // makes sure algorithm works fine