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 pricingGeneralize the two-node idea to find the lowest common ancestor of a set of target nodes.
What this asks
Generalize the two-node idea to find the lowest common ancestor of a set of target nodes.
Count how many targets each subtree contains; the first node whose count reaches the number asked for is 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