Interface LowestCommonAncestorStatic.IDataStructure

All Superinterfaces:
LowestCommonAncestorStatic.DataStructure<Integer,Integer>
Enclosing interface:
LowestCommonAncestorStatic

public static interface LowestCommonAncestorStatic.IDataStructure extends LowestCommonAncestorStatic.DataStructure<Integer,Integer>
Data structure result created from a static LCA pre-processing for IntGraph.
Author:
Barak Ugav
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    int
    findLca(int u, int v)
    Find the lowest common ancestor of two vertices in the tree.
    default Integer
    Deprecated.
    Please use findLca(int, int) instead to avoid un/boxing.
  • Method Details Link icon

    • findLca Link icon

      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
    • findLca Link icon

      @Deprecated default Integer findLca(Integer u, Integer v)
      Deprecated.
      Please use findLca(int, int) instead to avoid un/boxing.
      Find the lowest common ancestor of two vertices in the tree.
      Specified by:
      findLca in interface LowestCommonAncestorStatic.DataStructure<Integer,Integer>
      Parameters:
      u - the first vertex
      v - the second vertex
      Returns:
      the lowest common ancestor of u and v