Tag: lowestcommonancestor
-
Find the Lowest Common Ancestor of two given nodes of a Binary Search Tree
Given two nodes and the root node of a binary search tree, Find the lowest common ancestor of those two nodes. A common ancestor node is a node who is the parent of both the given nodes. Lowest common ancestor means there is no other common ancestor node which is lower than this node in…