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 690 / 702 1000
Component sum 638 / 650 1000
Minimum spanning tree 604 / 611 1100
Parking 524 / 535 1100
Remove edge 476 / 488 1200
Yet another problem 400 / 418 1200
Assignment query on tree 327 / 356 1400
Watering 245 / 251 1500
Minimum spanning tree 2 267 / 311 1600
Fatal meal 236 / 257 1600
Statement 168 / 180 1700
All pairs 171 / 180 1800
Query on tree 138 / 160 1800
Bad Apple!! 56 / 61 1800
Minimum spanning tree 3 98 / 115 1900