Package algs15

Interface UF

All Known Implementing Classes:
CompressionUF, QuickFindUF, QuickUnionUF, WeightedUF, XWeightedCompressionUF, XWeightedHalvingUF

public interface UF
The UF interface represents a union-find data data structure. It supports the union and find operations, along with a method for determining the number of disjoint sets.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    connected(int p, int q)
     
    int
     
    int
    find(int p)
     
    void
     
    void
    union(int p, int q)
     
  • Method Details