Describe data structure for Shuffle operation in a music player
Anonymous
There are 2 operations that the expected data structure should facilitate: 1) Randomly select an not-played song. 2) Determine if a song was played or not. I think we might to make 2 separated list, one contains the songs that are already played and the other contains the songs that are not played yet. Then using the random generator to pick one song from the unplayed list and move it to the played list once it is played. Any other better solution?
Check out your Company Bowl for anonymous work chats.