Lowest Common Ancestor (CodeEval)