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 pricingUse the BST ordering rule to decide whether both targets lie left, both lie right, or split at the current node.
What this asks
Use the BST ordering rule to decide whether both targets lie left, both lie right, or split at the current node.
Walk down one path: smaller than both means left, greater than both means right, and the first node that sits between the targets 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