unionSet

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 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 Set

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

func NewSet

func NewSet(n int) *Set

func (*Set) Find

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

Find 查找x所在的集合

func (*Set) InSameSet

func (s *Set) InSameSet(x, y int) bool

InSameSet 判断xy是否在同一个集合

func (*Set) Union

func (s *Set) Union(x, y int)

Union 联合

Jump to

Keyboard shortcuts

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