IMC Trading interview question

OOD, sorting