trees

package
v0.0.0-...-02d9e73 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DFSInOrder

func DFSInOrder(root *TreeNode, action Action)

func DFSPostOrder

func DFSPostOrder(root *TreeNode, action Action)

func DFSPreOrder

func DFSPreOrder(root *TreeNode, action Action)

Types

type Action

type Action func(node *TreeNode)

type TreeNode

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

func BuildTree

func BuildTree(values []int) *TreeNode

Jump to

Keyboard shortcuts

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