Citi interview question

Algorithm question: Tree traversal style problem.