find common ancestor in binary tree
Anoniem
1. Start from the root node of the tree. 2. Check that the value of both the nodes to be compared should be either more than, or less than the root node. 2a. If its more than the root, then traverse to the right child node, and check the same condition. 2b. If its less than the root, then traverse to the left child node, and check the same condition. 3. Keep recursing until you find the node where this condition is falsified.