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 746 / 758 1000
Component sum 692 / 703 1000
Minimum spanning tree 660 / 669 1100
Parking 568 / 579 1100
Remove edge 515 / 527 1200
Yet another problem 430 / 447 1200
Assignment query on tree 356 / 387 1400
Watering 270 / 276 1500
Minimum spanning tree 2 296 / 341 1600
Fatal meal 256 / 276 1600
Statement 175 / 188 1700
All pairs 181 / 190 1800
Query on tree 147 / 169 1800
Bad Apple!! 70 / 76 1800
Minimum spanning tree 3 106 / 123 1900