← Zomato questions
CodingReported in a candidate post, Jul 2025

Shuffle a playlist so each song plays once, plus previous-song

Filed under Zomato

Design a playlist shuffle: when shuffle is pressed, every song must play exactly once in random order. Implement next() to return the next song, and then a prev() that returns the previously played…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Zomato questions

Collected from public candidate posts and coding forums. Updated Nov 2026.