binarytree

package
v0.0.0-...-38f21a3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 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 Node

type Node[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func (*Node[T]) Height

func (n *Node[T]) Height() int

func (*Node[T]) Left

func (n *Node[T]) Left() *Node[T]

func (*Node[T]) Parent

func (n *Node[T]) Parent() *Node[T]

func (*Node[T]) Right

func (n *Node[T]) Right() *Node[T]

func (*Node[T]) Size

func (n *Node[T]) Size() int

func (*Node[T]) Value

func (n *Node[T]) Value() T

type Tree

type Tree[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func New

func New[T constraints.Ordered]() Tree[T]

func (*Tree[T]) Height

func (t *Tree[T]) Height() int

func (*Tree[T]) Insert

func (t *Tree[T]) Insert(val T)

func (*Tree[T]) Root

func (t *Tree[T]) Root() *Node[T]

func (*Tree[T]) Size

func (t *Tree[T]) Size() int

Jump to

Keyboard shortcuts

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