Pergunta de entrevista da empresa Amazon

Why Amazon, design an algorithm to rearrange numbers in a sequency, time complexity of the algorithm