3 10 Points Give Set 13 Elements Show Final Result Executing Following Instructions Ufweig Q37173121

3. (10 Points) Give a set with 13 elements, show the finalresult of executing the following instructions withUF_WeightedQuickUnion: union(12, 4), union(10, 6), union(0, 11),union(9, 11), union(11, 7), union(9, 10), union(10, 1), union(4,10), union(5, 2), union(1, 3). Assuming initially there are 13components. a) Show the final contents of id[] array. b) Draw thefinal forest of trees.


Answer


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.