RBTree

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: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BLACK = false
View Source
const RED = true

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

type RBTree

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

func New

func New() *RBTree

func (*RBTree) Add

func (rt *RBTree) Add(key interface{}, val interface{})

向红黑树中添加新的元素(key, value)

func (*RBTree) Contains

func (rt *RBTree) Contains(key interface{}) bool

func (*RBTree) Get

func (rt *RBTree) Get(key interface{}) interface{}

func (*RBTree) GetSize

func (rt *RBTree) GetSize() int

func (*RBTree) IsEmpty

func (rt *RBTree) IsEmpty() bool

func (*RBTree) KeySet

func (rt *RBTree) KeySet() []interface{}

获得红黑树所有的 key

func (*RBTree) Remove

func (rt *RBTree) Remove(key interface{}) interface{}

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

func (*RBTree) Set

func (rt *RBTree) Set(key interface{}, val interface{})

func (*RBTree) String

func (rt *RBTree) String() string

Jump to

Keyboard shortcuts

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