Pregunta de entrevista de Apple

Implement an algorithm to recursively travel a tree