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 665 / 677 1000
Component sum 610 / 624 1000
Minimum spanning tree 590 / 597 1100
Parking 502 / 512 1100
Remove edge 458 / 470 1200
Yet another problem 388 / 403 1200
Assignment query on tree 312 / 341 1400
Watering 232 / 237 1500
Minimum spanning tree 2 257 / 302 1600
Fatal meal 225 / 248 1600
Statement 156 / 167 1700
All pairs 161 / 170 1800
Query on tree 131 / 154 1800
Bad Apple!! 49 / 55 1800
Minimum spanning tree 3 91 / 107 1900