Union Find

Calculate time complexity
nothing ⇒ n
set up & update weights for each root ⇒ logn
Ackerman ⇒ ɑ(n)
Applied to Disjoint-set forests
from Wikipedia
(about find and union) These two techniques complement each other; applied together, the amortized time per operation is only O(α(n)), where α(n) is the inverse of the function f(n) = A(n,n), and A is the extremely quickly-growing Ackermann function. Since α(n) is the inverse of this function, α(n) is less than 5 for all remotely practical values of n. Thus, the amortized running time per operation is effectively a small constant.
Last updated