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
Click to show internal directories.
Click to hide internal directories.