Documentation ¶ Index ¶ type UnionFind func New(numV int) *UnionFind func (uf *UnionFind) Find(v int) int func (uf *UnionFind) IsConnected(v1, v2 int) bool func (uf *UnionFind) NumConnectedComponent() int func (uf *UnionFind) Union(v1, v2 int) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type UnionFind ¶ type UnionFind struct { // contains filtered or unexported fields } func New ¶ func New(numV int) *UnionFind func (*UnionFind) Find ¶ func (uf *UnionFind) Find(v int) int func (*UnionFind) IsConnected ¶ func (uf *UnionFind) IsConnected(v1, v2 int) bool func (*UnionFind) NumConnectedComponent ¶ func (uf *UnionFind) NumConnectedComponent() int func (*UnionFind) Union ¶ func (uf *UnionFind) Union(v1, v2 int) Source Files ¶ View all Source files union_find.go Click to show internal directories. Click to hide internal directories.