Pergunta de entrevista da empresa Appian

Sorting an array in different time complexities.