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 subtree depths while moving upward to find the lowest node containing all deepest leaves.
What this asks
Combine subtree depths while moving upward to find the lowest node containing all deepest leaves.
Each call reports the deepest level under it and a candidate ancestor; equal depths at a node merge both children's candidates into the node itself.
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