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 414 / 419 1000
Component sum 385 / 394 1000
Minimum spanning tree 362 / 368 1100
Parking 318 / 327 1100
Remove edge 300 / 306 1200
Yet another problem 242 / 251 1200
Assignment query on tree 199 / 218 1400
Watering 102 / 106 1500
Minimum spanning tree 2 153 / 178 1600
Fatal meal 139 / 154 1600
Statement 95 / 105 1700
All pairs 91 / 102 1800
Query on tree 76 / 93 1800
Minimum spanning tree 3 49 / 61 1900