rbtree

package
v0.0.0-...-1f7025e Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color bool
const (
	RED   Color = false
	BLACK Color = true
)

type Node

type Node[T constraints.Ordered] struct {
	Value               T
	Color               Color
	Parent, Left, Right *Node[T]
}

func NewNode

func NewNode[T constraints.Ordered](value T) *Node[T]

type Tree

type Tree[T constraints.Ordered] struct {
	Root *Node[T]
}

func NewTree

func NewTree[T constraints.Ordered]() *Tree[T]

Jump to

Keyboard shortcuts

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