Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 358 Bytes

README.md

File metadata and controls

3 lines (2 loc) · 358 Bytes

The lowest common ancestor (LCA) of any two nodes p and q in a tree, or a directed acyclic graph, is the lowest/deepest node that is the ancestor of p and q (i.e. p and q are the descendants of this node). p and q are both ancestors/descendants of themselves.