LCA problem

find out the algorithm for lowest common ancestor of the two given nodes