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 pricingHandle the important case where one target lies inside the other target's subtree.
What this asks
Handle the important case where one target lies inside the other target's subtree.
A node that is itself a target returns itself before searching below, so the higher target travels up unchanged and becomes the answer.
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