Lowest Common Ancestor of a Binary Search Tree
MediumLeetCodeAdvanced Trees (BST, LCA, Tree DP)
Approach hintTry it first, then revealHide
Use the ordering: if both values are smaller than the current node go left, and if both are larger go right. The first node where they split, or that equals one of them, is the answer in O(h).