Booking.com interview question

Problem solving algorithms, some trivial tree parsing exercises.