uniontree

package
v0.0.0-...-b5285df Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCircleNum

func FindCircleNum(M [][]int) int

Types

type UnionFindSet

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

并查集,判连通用

func NewUnionSet

func NewUnionSet(n int) *UnionFindSet

func (*UnionFindSet) Find

func (us *UnionFindSet) Find(x int) int

查询父结点

func (*UnionFindSet) Union

func (us *UnionFindSet) Union(x, y int) bool

合并结点

Jump to

Keyboard shortcuts

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