Module Disjoint Set Union (DSU)

Disjoint Set Union (DSU)

**Frequency: 6/10** A simple data structure.

Resources

- [CP Algorithms: Disjoint Set Union](https://cp-algorithms.com/data_structures/disjoint_set_union.html)

Problems

DSU 933 / 948 1000
Component sum 868 / 880 1000
Minimum spanning tree 829 / 843 1100
Parking 724 / 737 1100
Remove edge 653 / 663 1200
Yet another problem 539 / 561 1200
Assignment query on tree 448 / 485 1400
Watering 362 / 368 1500
Minimum spanning tree 2 378 / 430 1600
Fatal meal 324 / 347 1600
Statement 228 / 245 1700
All pairs 223 / 233 1800
Query on tree 187 / 209 1800
Bad Apple!! 98 / 105 1800
Minimum spanning tree 3 119 / 138 1900