Union-find: tracks a partition of a set under merge (union) and lookup-root (find). With union-by-rank plus path compression, both operations run in inverse-Ackermann amortised time — essentially constant.
Key formulas
Amortised time per operation: O(α(n)) with union-by-rank + path compression