NIO interview question

Implement iPod shuffle play given an input playlist.