AVLTree

package
v0.0.0-...-3b2a8e7 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AVLTree

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

func New

func New() *AVLTree

func (*AVLTree) Add

func (at *AVLTree) Add(key interface{}, value interface{})

向二分搜索树中添加新的元素(key, value)

func (*AVLTree) Contains

func (at *AVLTree) Contains(key interface{}) bool

func (*AVLTree) Get

func (at *AVLTree) Get(key interface{}) interface{}

func (*AVLTree) GetSize

func (at *AVLTree) GetSize() int

func (*AVLTree) IsBST

func (at *AVLTree) IsBST() bool

判断该二叉树是否是一颗二分搜索树

func (*AVLTree) IsBalanced

func (at *AVLTree) IsBalanced() bool

判断该二叉树是否是一棵平衡二叉树

func (*AVLTree) IsEmpty

func (at *AVLTree) IsEmpty() bool

func (*AVLTree) Remove

func (at *AVLTree) Remove(key interface{}) interface{}

从二分搜索树中删除键为 key 的节点

func (*AVLTree) Set

func (at *AVLTree) Set(key interface{}, value interface{})

func (*AVLTree) String

func (at *AVLTree) String() string

type Node

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

Jump to

Keyboard shortcuts

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