Amazon·Software Engineer·Technical Phone Screen
Jun 2026
Amazon SWE coding round, one question the whole time: a playlist generator with a no-repeat constraint. Pretty focused session, nothing behavioral, just straight into the problem.
- Design a playlist class that plays a random song each time it's called, but guarantees no song repeats within the last N plays. For example, given songs ['A', 'B', 'C', 'D'] and N=2, no song played should appear again until at least 2 other songs have played since.
“I went with a queue to track the recent N songs and a set for O(1) lookup, then just kept resampling until I got a valid pick.” The rest of the author's notes on Software Engineer interview at Amazon, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post