tree

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Swap

func Swap(l *BinaryNode, r *BinaryNode)

Types

type BinaryNode

type BinaryNode struct {
	Parent *BinaryNode
	Key    any
	Values []any
	Left   *BinaryNode
	Right  *BinaryNode
}

func (*BinaryNode) Empty

func (t *BinaryNode) Empty() bool

func (*BinaryNode) Push

func (t *BinaryNode) Push(tree *BinaryTree, node *BinaryNode)

type BinaryTree

type BinaryTree struct {
	Root    *BinaryNode
	Min     *BinaryNode
	Compare func(lKey any, rKey any) int
}

func (*BinaryTree) Push

func (t *BinaryTree) Push(key any, value any)

Jump to

Keyboard shortcuts

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