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
|
10 Discussions
|
Please Login in order to post a comment
Java 7 O(n)
Python. Should work for any tree not only binary search.
Python
C++
c++14 : works for any binary tree (the first example was misleading: i thought we were not dealing with a bst)