Booking.com Interview Question

system design, simple algorithm question