Citi Interview Question

Algorithm question: Tree traversal style problem.