Ubisoft Interview Question

basic sorting algorithm