Question
In Python, which comparison about Union-Find / Disjoint Set is accurate?
- There is no practical difference in behavior, performance, or maintainability when Union-Find / Disjoint Set is involved.
- It is stronger for dynamic connectivity queries than repeatedly recomputing components from scratch after every merge.
- The oldest option related to Union-Find / Disjoint Set is always the right production choice regardless of workload or context.
- Differences around Union-Find / Disjoint Set are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: B. It is stronger for dynamic connectivity queries than repeatedly recomputing components from scratch after every merge.
It is stronger for dynamic connectivity queries than repeatedly recomputing components from scratch after every merge. This is the comparison that usually separates memorization from understanding.
Track: Python