Binary Search Tree : Lowest Common Ancestor

  • + 0 comments

    Nice job. You can alternatively try to solve it iteratively like this to achieve O(1) space complexity since recursion takes O(log n) space.

    HackerRank solutions.