red_black_bst

package
v0.0.0-...-8859e38 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key int

func (Key) CompareTo

func (this Key) CompareTo(that Key) int

type Node

type Node struct {
	Key         Key
	Val         Value
	Left, Right *Node
	Color       bool
	Size        int
}

type RedBlackBST

type RedBlackBST struct {
	Root *Node
}

func NewEmptyRedBlackBST

func NewEmptyRedBlackBST() RedBlackBST

func NewRedBlackBST

func NewRedBlackBST(n *Node) RedBlackBST

func (*RedBlackBST) Contains

func (bst *RedBlackBST) Contains(k Key) bool

func (*RedBlackBST) Get

func (bst *RedBlackBST) Get(k Key) (Value, error)

func (*RedBlackBST) IsEmpty

func (bst *RedBlackBST) IsEmpty() bool

func (*RedBlackBST) Put

func (bst *RedBlackBST) Put(k Key, v Value)

func (*RedBlackBST) Size

func (bst *RedBlackBST) Size() int

type Value

type Value string

Jump to

Keyboard shortcuts

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