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 947 / 962 1000
Component sum 882 / 894 1000
Minimum spanning tree 842 / 856 1100
Parking 733 / 746 1100
Remove edge 660 / 670 1200
Yet another problem 546 / 568 1200
Assignment query on tree 451 / 489 1400
Watering 367 / 374 1500
Minimum spanning tree 2 381 / 433 1600
Fatal meal 329 / 352 1600
Statement 233 / 250 1700
All pairs 227 / 237 1800
Query on tree 189 / 211 1800
Bad Apple!! 98 / 105 1800
Minimum spanning tree 3 120 / 139 1900