Least common ancestor of binary tree(cod for binary search tree is in comments)