Pergunta de entrevista da empresa National Instruments

How will you design an algorithm to implement the shuffle concept in ipod?