Bottom-up DFS
O(n)Ask each child for its answer first, then combine the two into the answer for this node.
Reach for it when the answer for a node depends on its subtrees, such as height, balance or the best path below it.Go deeper: Pre-order, in-order and post-order, drawn