Find the common ancestor in a binary tree