Search
⌘K
Song Shuffler
Design an algorithm to shuffle a playlist of songs such that each song is played once in a random order. The algorithm should ensure that the shuffle is unbiased and each permutation of the playlist is equally likely.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early February, 2026
Amazon
Senior
Write code to create song playlist with functions to add and remove songs from playlist
Early January, 2025
Junior
Play songs in order: Given n people with specific song orders, find if a valid order exists that satisfies all preferences (topological ordering problem).
Late December, 2024
Mid-level
Song Shuffler
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.