Implement finding common ancestor for two nodes in a binary tree.