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
|
36 Discussions
|
Please Login in order to post a comment
Example BST is not a BST, right child of 2 should be 4, not 3. Please fix this confusion! Correct example for 1,2,3,4,5,6 with 2 as root is follows, which means LCA for 4 and 6 would be 2:
C++
Here is Hackerrank binary search tree lowest common ancestor problem solution in python java c++ c and javascript
The first example given is NOT a binary search tree. HackerRank, please fix it. It is confusing.