Union-find
by François Schwarzentruber
Here you may write things as "union(e, x);" or just "find(c);"...
Load example
In green: ranks, In orange: money that is earned by nodes (amortized analysis)