datastructures

package
v0.0.0-...-0cef28b Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BtreeTest

func BtreeTest()

Types

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

type UinonFind

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

func GetUnionFind

func GetUnionFind(size int) *UinonFind

func (*UinonFind) Find

func (uf *UinonFind) Find(index int) int

func (*UinonFind) GetNumOfComp

func (uf *UinonFind) GetNumOfComp() int

func (*UinonFind) GetSize

func (uf *UinonFind) GetSize() int

func (*UinonFind) GetSizeOfComp

func (uf *UinonFind) GetSizeOfComp(index int) int

func (*UinonFind) IsConnected

func (uf *UinonFind) IsConnected(index1 int, index2 int) bool

func (*UinonFind) Merge

func (uf *UinonFind) Merge(index1 int, index2 int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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