Lowest Common Ancestor of a Binary Search Tree — Interactive Visualizer

Walk downward until the current node becomes the first split point between p and q.