Pergunta de entrevista da empresa RedDoorz

Write an algorithm to sort all elements in an array.