What is the 'union by rank' optimization in Disjoint Set Union?

Practice Questions

Q1
What is the 'union by rank' optimization in Disjoint Set Union?
  1. Always attaching the smaller tree under the larger tree
  2. Always attaching the larger tree under the smaller tree
  3. Randomly attaching trees
  4. Merging trees based on their height

Questions & Step-by-Step Solutions

What is the 'union by rank' optimization in Disjoint Set Union?
No concepts available.
Soulshift Feedback ×

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

Not likely Very likely