Skip to main content
`Ctrl`+`K`

# Lowest Common Ancestor

Algorithms for finding the lowest common ancestor of trees and DAGs.

`all_pairs_lowest_common_ancestor`(G[, pairs]) | Return the lowest common ancestor of all pairs or the provided pairs
`tree_all_pairs_lowest_common_ancestor`(G[, ...]) | Yield the lowest common ancestor for sets of pairs in a tree.
`lowest_common_ancestor`(G, node1, node2[, ...]) | Compute the lowest common ancestor of the given pair of nodes.