Disjoint Set Union (DSU)
- How does it work?
- Path compression
- Union by size vs union by rank
- Time complexity
- Applications
- References
Disjoint Set Union (DSU) or is also called Union Find because of its 2 main operations. Problem:
How does it work?
make
find
union
Path compression
Union by size vs union by rank
Time complexity
Applications
- Kruskal
References
- Disjoint Set Union - CP-Algorithms
- Competitive Programming 4, section 2.4.2