Pregunta de entrevista de Google

Standard BQ questions. Coding was about tree traversal and loop detection.