Professional Documents
Culture Documents
Union-Find Structures: Presentation For Use With The Textbook,, by M. T. Goodrich and R. Tamassia, Wiley, 2015
Union-Find Structures: Presentation For Use With The Textbook,, by M. T. Goodrich and R. Tamassia, Wiley, 2015
Union-Find Structures
1 2 5
4 7 3 6 8 10
9 11
12
© 2015 Goodrich and Tamassia Union-Find 10
Union-Find Operations
5
To do a union, simply 2
make the root of one tree 8 10
point to the root of the 3 6
other 11
9 12
5 5
8 10 8 10
11 11
2 12 2 12
3 6 3 6
9 9