Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
type UnionFind ¶
type UnionFind struct {
// contains filtered or unexported fields
}
func NewUnionFind ¶
func NewUnionFind() *UnionFind
func (*UnionFind) FindInSet ¶
Get parent node of the union searching by value of its member Return union's parent Node O(m) time, O(1) space (in the worst case O(m), where m is the number of Union calls)
func (*UnionFind) Has ¶ added in v1.9.0
Check if UnionFind has union for specific value Return true if union exists O(1) time, O(1) space
Click to show internal directories.
Click to hide internal directories.