Add LeastCommonAncestor code.