redblacktreeextended

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: BSD-2-Clause, ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedBlackTreeExtended

type RedBlackTreeExtended[K comparable, V any] struct {
	*rbt.Tree[K, V]
}

RedBlackTreeExtended to demonstrate how to extend a RedBlackTree to include new functions

func (*RedBlackTreeExtended[K, V]) GetMax

func (tree *RedBlackTreeExtended[K, V]) GetMax() (value V, found bool)

GetMax gets the max value and flag if found

func (*RedBlackTreeExtended[K, V]) GetMin

func (tree *RedBlackTreeExtended[K, V]) GetMin() (value V, found bool)

GetMin gets the min value and flag if found

func (*RedBlackTreeExtended[K, V]) RemoveMax

func (tree *RedBlackTreeExtended[K, V]) RemoveMax() (value V, deleted bool)

RemoveMax removes the max value and flag if found

func (*RedBlackTreeExtended[K, V]) RemoveMin

func (tree *RedBlackTreeExtended[K, V]) RemoveMin() (value V, deleted bool)

RemoveMin removes the min value and flag if found

Jump to

Keyboard shortcuts

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