de.ls5.jlearn.util
Class UnionFind

java.lang.Object
  extended by de.ls5.jlearn.util.UnionFind

public class UnionFind
extends Object

Author:
fh

Constructor Summary
UnionFind(int n)
           
 
Method Summary
 int find(int x)
           
 boolean findAndUnite(int x, int y)
           
 void union(int p, int q)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnionFind

public UnionFind(int n)
Method Detail

union

public void union(int p,
                  int q)

find

public int find(int x)

findAndUnite

public boolean findAndUnite(int x,
                            int y)


Copyright © 2011. All Rights Reserved.