Pergunta de entrevista da empresa FactSet

Nothing unexpected. Construct trees given the node orders.