Amazon·Software Engineer·Technical Phone Screen
- Given a binary tree and two nodes, determine the relationship between them: are they siblings, cousins, or neither?
“I went straight to BFS and tracked depth plus parent for each node.”
285 Software Engineers have shared notes from their Amazon interviews, with the questions they were asked in each round. That is 90% of the 316 Amazon interview notes on Screna AI.
285 Software Engineer interview notes
“I went straight to BFS and tracked depth plus parent for each node.”
“Completely novel framing, nothing from my prep mapped onto it cleanly.”
“I knew the basics but fumbled the explanation a bit.”
“I stared at this longer than I should have.”
“I went straight to a prefix-sum approach for the sampling and kept a running total of weights.”
“The second part is where I think most people stumble and I almost did too.”
“They didn't ask me to introduce myself or say why I wanted the role.”
“My instinct was to tell the teammate to fix it themselves, which in hindsight makes sense but I ranked it higher than I should have.”
“I'd actually seen bucketing in my PhD work so I knew what the problem was asking conceptually.”
“I went with the BFS in-degree approach first since it naturally handles the impossible case by just checking if you've processed all nodes.”