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 pricingVisit every node in inorder: the whole left subtree, then the node, then the right.
What this asks
Visit every node in inorder: the whole left subtree, then the node, then the right.
Move the middle step: recurse left, handle the node, recurse right; on a BST the visits come out sorted.
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