Question d’entretien chez Citi

Algorithm question: Tree traversal style problem.