0-2, 1-4, 2-5, 3-6, 0-4, 6-0, 1-3
Warning: Make sure that your id[] array is produced exactly
as in the code on p. 132 (so, don't interchange the roles of p and q).
2.
Draw the forest-of-trees representation of the following
id[] array.
Can this be the result of running the weighted quick union algorithm (without path compression)? Either give a sequence of union operations that results in this array or explain why no such sequence exists.i 0 1 2 3 4 5 6 7 8 9 -------------------------- id[i] 1 1 3 1 5 6 1 3 4 5
Hint: Refer to the proof of Proposition E on p. 137.