193. Union-find methods document O(log |V|) (2026-11-22)
- Decision.
Dsu,DsuOf,ParityDsuandPotentialDsumethods state their cost over the receiver's domain:find,unite,same,sizeand the rest costO(log |V|),newcostsO(|V|).DsuandDsuOfadd "amortizedO(alpha(|V|))until the firstmark", sincemarkturns off path halving. A fn's estimated cost uses the first bound, which holds in every case thanks to union by size. - Why. The docs said
O(n)orO(alpha(n))without saying whatnis, or nothing, so every fn calling a union-find had no estimate. Fns incorpus/problemsand the examples with an estimate: 24 to 25 of 1,613;uniteandsizeno longer block any. - Reverse. Restore the old doc lines in
stdlib/dsu.cp.