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 554 / 566 1000
Component sum 513 / 526 1000
Minimum spanning tree 488 / 497 1100
Parking 418 / 428 1100
Remove edge 387 / 396 1200
Yet another problem 315 / 331 1200
Assignment query on tree 256 / 279 1400
Watering 171 / 175 1500
Minimum spanning tree 2 201 / 238 1600
Fatal meal 178 / 198 1600
Statement 121 / 131 1700
All pairs 114 / 125 1800
Query on tree 97 / 119 1800
Minimum spanning tree 3 65 / 81 1900