I noticed that for the solution to problem 21.3-1, only the resulting data structure was provided but the data structure doesn't show the path compression done and it also has 1 as the representative node for the set. It doesn't provide the answers returned by the 2 find set calls either.
The representative node should be 16 for the entire set and the two find-set operations should be included in modifying the tree via path compression.
I noticed that for the solution to problem 21.3-1, only the resulting data structure was provided but the data structure doesn't show the path compression done and it also has 1 as the representative node for the set. It doesn't provide the answers returned by the 2 find set calls either.
The representative node should be 16 for the entire set and the two find-set operations should be included in modifying the tree via path compression.