bst

package
v0.0.0-...-c03e3e1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 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 BST

type BST[T Ordered] struct {
	// contains filtered or unexported fields
}

func NewBST

func NewBST[T Ordered]() *BST[T]

func (*BST[T]) Delete

func (bst *BST[T]) Delete(value T) error

func (*BST[T]) FindMax

func (bst *BST[T]) FindMax() (T, error)

func (*BST[T]) FindMin

func (bst *BST[T]) FindMin() (T, error)

func (*BST[T]) InorderTraversal

func (bst *BST[T]) InorderTraversal(f func(T))

func (*BST[T]) Insert

func (bst *BST[T]) Insert(value T) error

func (*BST[T]) IsEmpty

func (bst *BST[T]) IsEmpty() bool

func (*BST[T]) PostorderTraversal

func (bst *BST[T]) PostorderTraversal(f func(T))

func (*BST[T]) PreorderTraversal

func (bst *BST[T]) PreorderTraversal(f func(T))

func (*BST[T]) Search

func (bst *BST[T]) Search(value T) bool

func (*BST[T]) Size

func (bst *BST[T]) Size() int

type Ordered

type Ordered interface {
	constraints.Ordered
}

Jump to

Keyboard shortcuts

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