You have an audio player that randomly selects songs from a playlist and plays them. However, it should not repeat a song until all the songs in the playlist have been played at least once. Describe the algorithm or strategy you would employ to ensure that every song is played before any song is repeated.