disjointset

package
v0.0.0-...-b071cee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisjointSet

type DisjointSet struct {
	// contains filtered or unexported fields
}

func NewDisjointSet

func NewDisjointSet() *DisjointSet

NewDisjointSet create a new set

func (*DisjointSet) Find

func (s *DisjointSet) Find(x int) int

Find find root parent for node x

func (*DisjointSet) Init

func (s *DisjointSet) Init(n int)

Init init set

func (*DisjointSet) Merge

func (s *DisjointSet) Merge(i, j int)

Merge merge node i and node j

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL