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 486 / 494 1000
Component sum 452 / 463 1000
Minimum spanning tree 425 / 435 1100
Parking 369 / 379 1100
Remove edge 349 / 356 1200
Yet another problem 284 / 298 1200
Assignment query on tree 229 / 250 1400
Watering 136 / 141 1500
Minimum spanning tree 2 170 / 201 1600
Fatal meal 159 / 176 1600
Statement 109 / 118 1700
All pairs 99 / 110 1800
Query on tree 85 / 104 1800
Minimum spanning tree 3 55 / 70 1900