Connected Components and Union-Find

Also reported as Merge Products into Categories

CodingAmazonLast reported September 2026Medium Frequency
Reported
7× across candidate reports
First seen
November 2025
Last reported
September 2026
Reported outcome
mixed

Problem Overview

The round: seven Amazon reports, November 2025 to September 2026, every one a different face of the same tool: find connected components, usually with union-find. An intern phone screen asked for the number of connected components given nodes and edges (the candidate used union-find with path compression and union by…

  • 2 candidate-reported follow-ups — the exact probes interviewers asked, with the trigger for each
  • The rest of the problem statement — full requirements, constraints, and edge cases
  • Approach and trade-offs — what passing candidates did, and the mistakes that sink people
Unlock the full Amazon catalog
Full problem statements, candidate-reported follow-ups, and walkthroughs — for every Amazon question.
Unlock with Pro
Already a member? Sign in
Verified Source
Every question is reconstructed from multiple independent candidate reports. Verbatim follow-ups, not invented ones.
Codex Fact-Checked
Technical claims, formulas, and scale numbers are reviewed against primary sources.
Interviewer Follow-ups
The exact follow-ups reported by candidates, with the trigger that prompts each one — plus the mistakes that sink people.
Is this helpful?