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 467 / 474 1000
Component sum 433 / 445 1000
Minimum spanning tree 409 / 417 1100
Parking 346 / 356 1100
Remove edge 329 / 336 1200
Yet another problem 269 / 281 1200
Assignment query on tree 216 / 236 1400
Watering 124 / 128 1500
Minimum spanning tree 2 166 / 195 1600
Fatal meal 153 / 167 1600
Statement 103 / 113 1700
All pairs 95 / 106 1800
Query on tree 82 / 100 1800
Minimum spanning tree 3 53 / 67 1900