Pick a random next song that was not among the last k played, in O(1).
Pick a random next song that was not among the last k played, in O(1).
Unlock the full question and reference solution
One-time unlock. Yours forever.
Or get a for every question, unlimited code runs and AI mock interviews.
Opens with the full question.