Question d’entretien chez Booking.com

system design, simple algorithm question