Agoda Interview Question

write sorting algorithm. create soldier team of 3 based on ranking