SongShuffler with Cooldown

Asked at StackAdapt · Coding Questions · Difficulty: Medium

Implement a song shuffler class `SongShuffler` which accepts two parameters, a list `songs` and an integer `cooldown` representing the playlist and cooldown time. During cooldown, a song cannot be returned consecutively (a returned song is blocked for the next `cooldown` calls).

Loading the problem…