← Google questions

Music player shuffle with cooldown

Filed under Google

Given a list of songs and an integer k, implement a shuffle algorithm where the same song cannot be played again until at least k other songs have been 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 Google questions

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