Design a Go music player with playlists
Company: Paramount Commerce
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Technical Screen
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.
Quick Answer: 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.