Binary Search Tree : Lowest Common Ancestor

  • + 2 comments

    for example, for a tree: 4 2 3 1 7 6 8

    if you want to find the lowest common ancestor of 6 and 8, your code outputs 7, but the correct answer should be 4!