Groups
Category
Amortized analysis measures the average cost per operation over a worst-case sequence, not over random inputs.
A DSU with weighted edges (also called a potential or difference-constraint union-find) maintains relative values between elements while still supporting near-constant-time merges and finds.