Pregunta de entrevista de LinkedIn

Implement a tree traversal with some data extraction