Design a Go music player with playlists
Paramount CommerceSoftware Engineer · Technical ScreenLast updated
This question evaluates object-oriented system design, API and data-structure modeling, state and concurrency management, persistence considerations, and algorithmic time/space complexity within a Go-based music player domain.
Design and implement an object-oriented music management player in Go. Requirements: represent Song, Playlist, and Player types; support adding/removing songs, reordering, and optional deduplication; support merging two playlists while preserving order and handling duplicates according to a policy you define; support playing a playlist with play, pause, next, previous, shuffle, and repeat; expose clear APIs and data structures and discuss their time/space complexity; consider concurrency for simultaneous edits and playback, thread safety, and persistence; and outline unit tests for core behaviors.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.