avl_tree

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[V any]() *avlTree[string, V]

Creates new AVL tree with string key type.

func NewWithCustomKey

func NewWithCustomKey[K, V any](comp comparer.Comparer[K]) *avlTree[K, V]

Creates new AVL tree with custom key type. Corresponding Comparer is required.

Types

type AVLTree

type AVLTree[K any, V any] interface {
	Insert(key K, val V) error
	Get(key K) (V, error)
	Remove(key K) error
	Clear()
	Size() uint
	Keys() []K
}

Jump to

Keyboard shortcuts

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