Low-Level Design · Stackadapt · Medium
Song Shuffler Medium · Topics · Company Tags · Hints Design a class SongShuffler that simulates random playback with a cooldown restriction. The class is initialized with a list of unique song identifiers songs and a nonnegative integer cooldown. After a song is played via shuffle(), it must not be returned again for the next cooldown calls to shuffle(). The method should otherwise return a random song uniformly among those currently eligible, and if no song is eligible it…
Checking your access…