mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-02-13 23:46:33 +08:00
Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user