Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 20 Prof. Erik Demaine Disjoint-set data structure (Union-Find) Problem: Maintain a dynamic collection of pairwise-disjoint…