Booking.com interview question

Sorting algorithm as the question