← Questions

Music player that plays the most frequent unplayed song

0
AmazonCodingLast asked Mar 2025

Users keep arriving, each with a list of songs, and every song's count goes up each time it appears. The player must always play the most frequent song that has not been played yet; a played song can only come back once every song has been played. Design the structure that supports adding users and choosing the next song efficiently.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding