Data Structures & AlgorithmsHardICPC regional · data structures

Problem: What is the Ackermann-related complexity that appears in union-find analysis?

  1. A. The logarithm of n
  2. B. The square root of n
  3. C. The factorial of n
  4. D. The inverse Ackermann function alpha(n)

Correct answer: D. The inverse Ackermann function alpha(n)

Union-find with path compression and union by rank costs O(alpha(n)) amortised per operation.

More Coding Interview Problems questions

Exams that ask this topic