@@ -0,0 +1,660 @@
+//https://www.hackerrank.com/challenges/binary-search-tree-lowest-common-ancestor%0A%0A/* You only have to complete the function given below.%0A    class Node %7B%0A        int data;%0A        Node left;%0A        Node right;%0A    %7D%0A*/%0A%0Astatic Node lca(Node root, int v1, int v2)%7B%0A    if(root == null)%7B%0A        return null;%0A    %7D%0A    %0A    if(v1 %3E v2)%7B%0A        final int v3 = v1;%0A        v1 = v2;%0A        v2 = v3;%0A    %7D%0A    %0A    do %7B%0A        if(v2 %3C root.data && root.left != null)%7B%0A            root = root.left;%0A        %7D else if (v1 %3E root.data && root.right != null)%7B%0A            root = root.right;%0A        %7D else %7B%0A            return root;%0A        %7D%0A    %7D while (true);%0A%7D%0A

Create binary-search-tree-lowest-common-ancestor.java