avl

package
v0.0.0-...-73cdf94 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AVL

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

func NewAVL

func NewAVL() *AVL

func (*AVL) Add

func (avl *AVL) Add(k int, v interface{})

func (*AVL) Contains

func (avl *AVL) Contains(k int) bool

func (*AVL) IsBST

func (avl *AVL) IsBST() bool

判断该二叉树是否是一棵二叉搜索树(通过中序遍历判断)

func (*AVL) IsBalanced

func (avl *AVL) IsBalanced() bool

判断该二叉树是否为平衡二叉树

func (*AVL) IsEmpty

func (avl *AVL) IsEmpty() bool

func (*AVL) Len

func (avl *AVL) Len() int

func (*AVL) Maximum

func (avl *AVL) Maximum() *TreeNode

func (*AVL) Minimum

func (avl *AVL) Minimum() *TreeNode

func (*AVL) Remove

func (avl *AVL) Remove(k int) *TreeNode

type TreeNode

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

func (*TreeNode) String

func (n *TreeNode) String(depth int) string

Jump to

Keyboard shortcuts

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