public class UnionFind extends Object
| Constructor and Description |
|---|
UnionFind() |
| Modifier and Type | Method and Description |
|---|---|
static UnionFind[] |
createArray(int size) |
UnionFind |
find() |
void |
merge(UnionFind other)
Unites the sets.
|
int |
rank() |
public UnionFind find()
public void merge(UnionFind other)
other - set to unite withpublic int rank()
public static UnionFind[] createArray(int size)
Copyright © 2018. All rights reserved.