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 511 / 520 1000
Component sum 476 / 487 1000
Minimum spanning tree 455 / 465 1100
Parking 385 / 395 1100
Remove edge 363 / 372 1200
Yet another problem 295 / 309 1200
Assignment query on tree 239 / 263 1400
Watering 150 / 155 1500
Minimum spanning tree 2 178 / 210 1600
Fatal meal 164 / 181 1600
Statement 110 / 120 1700
All pairs 102 / 113 1800
Query on tree 88 / 108 1800
Minimum spanning tree 3 57 / 73 1900