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.
Is there no oversight for questions? There are two ridiculous problems with this one.
1) The first example given is not a BST. So why include it in the problem at all when the statement starts off talking about BSTs?
2) An ancestor, by definition, is something from which another is descended. So it is impossible to be your own ancestor. Therefore Test Case #2 is wrong.
Is the point of HackerRank to solve interesting algorithmic questions or to beat you over the head with useless and/or wrong information?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Search Tree : Lowest Common Ancestor
You are viewing a single comment's thread. Return to all comments →
Is there no oversight for questions? There are two ridiculous problems with this one.
1) The first example given is not a BST. So why include it in the problem at all when the statement starts off talking about BSTs?
2) An ancestor, by definition, is something from which another is descended. So it is impossible to be your own ancestor. Therefore Test Case #2 is wrong.
Is the point of HackerRank to solve interesting algorithmic questions or to beat you over the head with useless and/or wrong information?