Pregunta de entrevista de Appian

Sorting an array in different time complexities.