Pregunta de entrevista de Booking.com

Problem solving algorithms, some trivial tree parsing exercises.