What is the Lowest Common Ancestor? In a tree, the lowest common ancestor (LCA) of two nodes, n1 and n2,…