Closed HallOfSam closed 4 years ago
I believe 3 is the parent node, so at the end, if you use the ds.find(x) for any of the 5 subsets you get 3. I am not positive about this but it seems correct.
I believe 3 is the parent node, so at the end, if you use the ds.find(x) for any of the 5 subsets you get 3. I am not positive about this but it seems correct.
Yeh I agree. It makes no sense if 3 is a child node, since a child node cannot point to more than 1 parent.
Yes, it should be parent according to the figure because after certain behaviors, you want to generate a result exactly same as the output.
In the exercises for Disjoint Sets we are required to build the tree structure as shown in that graph. But does anyone know whether the node that contains 3 is a child node or a parent node? Thanks in advance!