bst

package
v0.0.0-...-5f731eb Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 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 Node

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

BST node.

type Tree

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

BST type.

func New

func New() *Tree

New binary search tree.

func (*Tree) Insert

func (t *Tree) Insert(value interface{})

Inserts the given value.

func (*Tree) Max

func (t *Tree) Max() interface{}

Max value.

func (*Tree) Min

func (t *Tree) Min() interface{}

Min value.

func (*Tree) Remove

func (t *Tree) Remove(value interface{}) bool

Removes the given value.

Jump to

Keyboard shortcuts

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