Binary Search Tree : Lowest Common Ancestor

  • + 0 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.