If either n1 or n2 matches with root 's data, report the presence  by setting v1 or v2 as True and return root (Note that if a key is ancestor of other, then the ancestor key becomes LCA)
if ( root . data == n1 ) : NEW_LINE INDENT v1 = True NEW_LINE return root NEW_LINE DEDENT if ( root . data == n2 ) : NEW_LINE INDENT v2 = True NEW_LINE return root NEW_LINE DEDENT