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 370 / 375 1000
Component sum 352 / 359 1000
Minimum spanning tree 333 / 339 1100
Parking 293 / 302 1100
Remove edge 273 / 278 1200
Yet another problem 221 / 230 1200
Assignment query on tree 177 / 196 1400
Watering 88 / 92 1500
Minimum spanning tree 2 139 / 161 1600
Fatal meal 122 / 136 1600
Statement 81 / 89 1700
All pairs 78 / 83 1800
Query on tree 65 / 76 1800
Minimum spanning tree 3 36 / 47 1900