Amazon·Software Engineer·Onsite - Coding / Algorithms
- Design a music player scheduling system that always plays the globally most frequent unplayed song, resets all songs to playable once every song has been played at least once in the current round, and supports adding user song lists that update global frequencies. Implement addUserSongs and nextSong operations with time/space complexity analysis.
“My first instinct was a max-heap sorted by frequency and I went with that, but the round-reset logic tripped me up for a bit.”