Anonymous · shared experience20 Jan 2025 · 4 views
Rippling: Songs ranked by unique listeners and each user's recent plays
Problem. You get a stream of plays, each a song and the user who played it. Return songs ordered by how many distinct users played them, highest first.
Follow-up. For each user, return the three songs they played most recently. Then discuss the time cost when the number of recent songs asked for is arbitrary rather than three.
What mattered. The candidate felt code clarity was the weak spot, so keep the classes and helper methods tidy while extending the solution.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.