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 718 / 730 1000
Component sum 664 / 676 1000
Minimum spanning tree 631 / 641 1100
Parking 543 / 554 1100
Remove edge 494 / 506 1200
Yet another problem 411 / 430 1200
Assignment query on tree 336 / 365 1400
Watering 253 / 258 1500
Minimum spanning tree 2 278 / 320 1600
Fatal meal 244 / 264 1600
Statement 170 / 183 1700
All pairs 176 / 185 1800
Query on tree 141 / 164 1800
Bad Apple!! 65 / 70 1800
Minimum spanning tree 3 102 / 119 1900