binarytree

package
v0.0.0-...-010b5d8 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalancedBinaryTree

type BalancedBinaryTree[T cmp.Ordered] struct {
	// contains filtered or unexported fields
}

func New

func New[T cmp.Ordered](value T) *BalancedBinaryTree[T]

func (*BalancedBinaryTree[T]) InOrder

func (b *BalancedBinaryTree[T]) InOrder() iter.Seq2[int, T]

func (*BalancedBinaryTree[T]) Insert

func (b *BalancedBinaryTree[T]) Insert(val T)

type BinaryTree

type BinaryTree[T cmp.Ordered] interface {
	Insert(value T)
	Delete(value T)
	Search(value T) bool
	FindMin() T
	FindMax() T
	InOrder() iter.Seq2[int, T]
	PreOrder() iter.Seq2[int, T]
	PostOrder() iter.Seq2[int, T]
	Height() T
	Size() T
	Clear()
}

Jump to

Keyboard shortcuts

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