You are viewing a single comment's thread. Return to all comments →
The solution is well thought, but I believe the following (custom) test case provides incorrect answer-
6
2 1 3 4 5 6
3 4
Expected - 1 Recieved - 3
The tree is same as the first example. Kindly let me know if I am misunderstanding something.
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Binary Search Tree : Lowest Common Ancestor
You are viewing a single comment's thread. Return to all comments →
The solution is well thought, but I believe the following (custom) test case provides incorrect answer-
6
2 1 3 4 5 6
3 4
Expected - 1 Recieved - 3
The tree is same as the first example. Kindly let me know if I am misunderstanding something.