Pergunta de entrevista da empresa Pandora

Asked a question about sorting an array.