Interface LowestCommonAncestorStatic.IDataStructure

    • Method Detail

      • findLca

        int findLca​(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\)