This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingCombine the best leaf-to-node chains of both sides so the largest leaf-to-leaf path wins.
What this asks
Find the largest sum along a path that starts and ends at leaves.
Each call returns the best leaf-to-node chain; at every node the two chains join into a candidate, and a running best keeps the maximum.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing