Amazon | SDE 2 | USA | Phone Interview

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-05-31Added By Anonymous
Source: Link

Company: Amazon
Role: SDE 2
Interview Stage: Phone Interview
Location: USA
Year: unknown

Original Post Content:

A couple of weeks ago, I had my Amazon phone screen interview for the SDE 2 role.

It began with the interviewer introducing themselves, and then I introduced myself. The first question was a leadership principle-based behavioral question. I can’t share the exact question, but it was one of the most commonly asked ones.

After that, we jumped into the DSA portion.
Q1:
Find the Lowest Common Ancestor (LCA) in an N-ary tree, starting from two given nodes.

Follow-up:
Solve the same LCA problem, but this time you're given the root of the tree and two IDs of nodes instead of direct references to nodes.

Once I completed that, there were around 10 minutes left. The interviewer asked if I wanted to look at one more question — we wouldn’t be able to code it due to time limits, but we could at least discuss it. I agreed.

Q2:
Reorganize String — LeetCode 767

I initially struggled a bit with understanding how to design the sorting logic for the PriorityQueue, but eventually figured it out. The key insight was managing the heap by checking the two most frequent characters (using poll() or peek()), and reorganizing the string accordingly.

Verdict: Passed.
Comments