Pregunta de entrevista de Optiver

A coding question. It was data sorting