We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Binary Search Tree : Lowest Common Ancestor
- Discussions
Binary Search Tree : Lowest Common Ancestor
Binary Search Tree : Lowest Common Ancestor
Sort by
recency
|
30 Discussions
|
Please Login in order to post a comment
C#:
this is C# solotion
Solution C#
Solution C#
node is lca if min <= root->data <= max In other words, lca is the node between the 2 values, or if one of the nodes is the parent of the other.
Below is my cpp sol