Booking.com interview question

Develop algorithms and talk about its efficiency using Big O notation.