tree

package
v0.0.0-...-e0d0e9d Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Same

func Same(t1, t2 *Tree) bool

Same determines whether the trees t1 and t2 contain the same values.

func Walk

func Walk(t *Tree, ch chan<- int)

Walk walks the tree t sending all values from the tree to the channel ch.

func Walker

func Walker(t *Tree) <-chan int

Types

type Tree

type Tree struct {
	Left  *Tree
	Value int
	Right *Tree
}

func New

func New(k int) *Tree

Jump to

Keyboard shortcuts

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