What is the time complexity of the 'Union' operation in an optimized Disjoint Set Union with path compression and union by rank?

Practice Questions

1 question
Q1
What is the time complexity of the 'Union' operation in an optimized Disjoint Set Union with path compression and union by rank?
  1. O(1)
  2. O(log n)
  3. O(n)
  4. O(α(n))

Questions & Step-by-step Solutions

1 item
Q
Q: What is the time complexity of the 'Union' operation in an optimized Disjoint Set Union with path compression and union by rank?
Solution: The time complexity of the 'Union' operation in an optimized Disjoint Set Union with path compression and union by rank is O(α(n)), where α is the inverse Ackermann function.
Steps: 8

Related Questions

Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely