Package com.jgalgo

Interface LowestCommonAncestorStatic.DataStructure

  • Enclosing interface:
    LowestCommonAncestorStatic

    public static interface LowestCommonAncestorStatic.DataStructure
    Data structure result created from a static LCA pre-processing.
    Author:
    Barak Ugav
    • Method Detail

      • findLowestCommonAncestor

        int findLowestCommonAncestor​(int u,
                                     int v)
        Find the lowest common ancestor of two vertices in the tree.
        Parameters:
        u - the first vertex
        v - the second vertex
        Returns:
        the lowest common ancestor of \(u\) and \(v\)