Downloads
| Download details |
| Question:
Consider the following sequence of union commands on the set of elements
{13, ………..........., 29}:
union(find(14),find(20)),
union(find(16),find(18)),
union(find(14),find(15)),
union(find(16),find(17)),
union(find(29),find(13)),
union(find(14),find(27)),
union(find(29),find(24)),
union(find(21),find(22)),
union(find(14),find(23)),
union(find(16),find(23)),
union(find(16),find(24)),
union(find(16),find(25)),
union(find(27),find(28))
Show the results of the above Union commands for each method given below in pictorial form. You are required to show only the final output with diagram and array for each method.
a) Using the first union method given by Weiss
b) Using union-by-weight
c) Using union-by-height
|
|
|||||||||||||||
