In a BST, values are ordered: left < root < right. If both p and q are smaller than root, the LCA is in the left subtree. If both are greater, the LCA is in the right subtree. If one is smaller and one is greater (or one equals root), the current node is the LCA. This gives a simple traversal without checking all paths.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/trees-bst/lowest-common-ancestor-of-bst-hint
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████████████████████████████████████████████████████████████████████████████████████████