Another conceptual question, this time on disjoint sets:
I will not draw the tree i got but will give the answer in an implicit representation:Show the result of the following sequence on instructions: union(1, 2) union(3, 4) union(3, 5) union(1, 7) union(3, 6), union(8, 9) union(1, 8) union(3, 10)
what do you guys think? is it correct?Code:[ 0][ 1][ 2][ 3][ 4][ 5][ 6][ 7][ 8][ 9][10] [-1][-1][ 1][-1][ 3][ 3][ 3][ 1][ 1][ 8][ 3]