Pregunta de entrevista de Apple

Solving a binary tree question. A distributed nodes, counting problem.