Documentation
¶
Index ¶
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
}
UnionFind can union two disjoint sets and find the disjoint set an element belong to in O(1) time. Each element is identified by an integer as an index of the underlying array.
func NewUnionFind ¶
NewUnionFind creates a UnionFind that identifies n elements, from 0 to n-1.
Click to show internal directories.
Click to hide internal directories.