Trivia ForgePlay free →

What is the amortized time complexity of a 'Find-Set' operation when using both path compression and union-by-rank heuristics?

Show answer

O(alpha(n))

The function alpha(n) is the inverse Ackermann function, which grows extremely slowly. For all practical values of n, this complexity is effectively constant (less than 5).

Also asked as:
  • When path compression and union-by-rank heuristics are both applied, what is the amortized complexity of a 'Find-Set' operation?

Would you remember this in 6 months?

Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.

Turn on Algorithms practice →

More Algorithms trivia

See all 83 →