BST

package
v0.0.0-...-adc727d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BST

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

func Constructor

func Constructor() *BST

func (*BST) Add

func (this *BST) Add(e interface{})

向二分搜索树中添加新的元素 e

func (*BST) Contains

func (this *BST) Contains(e interface{}) bool

看二分搜索树中是否包含元素 e

func (*BST) GetSize

func (this *BST) GetSize() int

func (*BST) InOrder

func (this *BST) InOrder()

二分搜索树的中序遍历

func (*BST) IsEmpty

func (this *BST) IsEmpty() bool

func (*BST) Maximum

func (this *BST) Maximum() interface{}

寻找二分搜索树的最大元素

func (*BST) Minimum

func (this *BST) Minimum() interface{}

寻找二分搜索树的最小元素

func (*BST) PostOrder

func (this *BST) PostOrder()

二分搜索树的后序遍历

func (*BST) PreOrder

func (this *BST) PreOrder()

二分搜索树的前序遍历

func (*BST) Remove

func (this *BST) Remove(e interface{})

从二分搜索树中删除元素为 e 的节点

func (*BST) RemoveMax

func (this *BST) RemoveMax() interface{}

从二分搜索树中删除最小值所在的节点,返回最小值

func (*BST) RemoveMin

func (this *BST) RemoveMin() interface{}

从二分搜索树中删除最小值所在的节点,返回最小值

func (*BST) String

func (this *BST) 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