Source: wikibot/tarjan-s-off-line-lowest-common-ancestors-algorithm
= Tarjan's off-line lowest common ancestors algorithm
{wiki=Tarjan's_off-line_lowest_common_ancestors_algorithm}
Tarjan's off-line lowest common ancestors (LCA) algorithm is a method used to efficiently find the lowest common ancestor of multiple pairs of nodes in a tree. The algorithm is named after Robert Tarjan, who developed it based on union-find data structures.