gravatar

Blog # 18 : Lowest common ancestor in a Binary Search Tree

Find lowest common ancestor of two given nodes in a Binary Search Tree.

Hint for a corner case : Instead of some trivial solutions please keep in mind that value of nodes can be same in a BST.