Lowest Common Ancestor of BST
#235
Medium
Binary Tree
O(h)
O(h)
Amazon
Microsoft
Facebook
LinkedIn
Problem Description
Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST.
Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST.