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 284 / 287 1000
Component sum 264 / 267 1000
Minimum spanning tree 259 / 265 1100
Parking 213 / 219 1100
Remove edge 212 / 216 1200
Yet another problem 162 / 170 1200
Assignment query on tree 139 / 153 1400
Watering 48 / 50 1500
Minimum spanning tree 2 107 / 126 1600
Fatal meal 97 / 107 1600
Statement 56 / 63 1700
All pairs 59 / 62 1800
Query on tree 54 / 65 1800
Minimum spanning tree 3 28 / 38 1900