Google DeepMind interview question

Coding question: Simple tree base problem with tree transversal