InterviewDB Experience

Song Sequence: Reconstruct Playlist Order from Partial Overlap Clues

Interview Experience

Problem You are given a list of song pairs (a, b) meaning song a was played immediately before song b in a playlist. Reconstruct the full playlist order. Assume the input forms a single valid sequence with no ambiguity. Follow-ups How do you identify the starting song (the one that never appears as a "next" song)? What if the pairs form a cycle — how would you detect and report that? If some pairs are missing (gaps in the sequence), how do you handle discontinuous playlists? Extend to reconstruc…

Full Details

🔒

Unlock all Spotify questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a candidate experience report from a spotify interview during the phone round.

It covers the following topics: Coding, Onsite, Phone .