1. Consider the following program:
1 po
I
1 for i from 1 to 12:
2 MakeSet(i)
3 Union(2, 10)
4 Union(7,5)
5 Union(6, 1)
6 Union(3, 4)
7 Union(5, 11)
8 Union(7, 8)
9 Union(7, 3)
10 Union(12, 2)
11 Union(9, 6)
12 print(Find(6))
13 print(Find(3))
14 print(Find(11))
15 print(Find(9))
Assume that the disjoint sets data structure is implemented as an array smallest[1...12): smallest[i] is equal to the
smallest element in the set containing i.
What is the output of the following program? As an answer, enter four integers separated by spaces.
Answers
Answered by
0
Answer:
oh my goodness such a large question please write small question
Similar questions