Union-Find quiz
How many connected components result after performing the following sequence of union operations on a set of 10 items?
1-2 3-4 5-6 7-8 7-9 2-8 0-5 1-9
1
2
3
4
Submit
Suppose the following set of union operations were performed in quick-find. How many array accesses required to determine find(7)
1-2 3-4 5-6 7-8 7-9 2-8 0-5 1-9
1
2
3
4
Submit
What is the maximum number of id[] array entries that can change (from one value to a different value) during one call to union when using the quick-find data structure on N elements?
1
lg N
N-1
N
Submit