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 888 / 901 1000
Component sum 822 / 834 1000
Minimum spanning tree 782 / 794 1100
Parking 678 / 692 1100
Remove edge 620 / 630 1200
Yet another problem 513 / 533 1200
Assignment query on tree 423 / 457 1400
Watering 340 / 345 1500
Minimum spanning tree 2 351 / 400 1600
Fatal meal 305 / 328 1600
Statement 213 / 229 1700
All pairs 213 / 222 1800
Query on tree 175 / 197 1800
Bad Apple!! 91 / 98 1800
Minimum spanning tree 3 117 / 136 1900