Disjoint set union
Problems on disjoint set union, including merging groups and answering whether two elements are connected, counting components as edges are added, Kruskal's minimum spanning tree, processing deletions offline in reverse, and keeping extra data such as sizes or parity per set.
The disjoint set union article in the Data structures section explains the structure, and Kruskal's algorithm shows its best-known use. Related problem sets are under Graphs and Trees.
Problems
Islands#78
Medium
Ancestors#437
Very easy
Money Matters#543
Very easy
Road Reform#690
Easy
Chinese Ink#788
Hard
Gasoline#824
Easy
Quick Answer#1371
Very easy
Underground Cables#1387
Medium
CHM#1884
Easy
Almost Union-Find#2047
Medium
Telephone Network#2457
Very hard
Common Ancestor - 3#3300
Very easy
King Slime#3402
Hard
AYBABTU#3561
Hard
Two Famous Companies#3589
Very hard
Chain#3758
Hard
Peaks#4047
Hard