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
Google
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Early February, 2026
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).
Hello Interview Premium
Your account is free and you can post anonymously if you choose.