Pregunta de entrevista de Visma

Q: Programming related. How would you solve this problem (array sorting)