def find_lca(node, n1, n2):
    """Finds LCA of 2 numbers by recursively searching in left and right subtree
    input args : current node, the numbers whose lca is to be found, isFound list telling if the particular element is found
    returns : lca if found else None    
    Time complexity : O(n), Space complexity : O(1)
    """
    if node == None:
        return None

    # if one element is found in current node, we return it
    # in normal case, both elements are found in different subtrees, called recursively, which is handeled later in this function
    # there may also be the case when one element is ancestor of another, which is handeled here, as this node is tha lca
    if node.data == n1:
        return node
    elif node.data == n2:
        return node

    # Recursive calls
    lca_left = find_lca(node.left, n1, n2)
    lca_right = find_lca(node.right, n1, n2)

    if (
        lca_left and lca_right
    ):  # if both are not none, that is 1 element is found in each subtree
        return node  # that means, current node is the lca
    else:  # both numbers in same sub tree
        return (
            lca_left if lca_left != None else lca_right
        )