In a binary integer value tree, find the lowest level common ancestor of two values.
Utilisateur anonyme
Do the binary search for both elements at the same time...as soon as their paths diverge (i.e. you have to go left for one element and right for the other) save the node where it happened...this is the lowest common ancestor...however you should still carry out the recursion to verify that both values are indeed in the tree. Complexity is same as standard binary tree search, O(log n).