tree

package
v0.0.0-...-9b92ec5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LevelOrder

func LevelOrder(root *Node) []string

Types

type NTree

type NTree struct {
	Val      int
	Children []*NTree
}

type Node

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

func CreateNode

func CreateNode(val string) *Node

func CreateTree

func CreateTree(treeStr string) (tree *Node)

CreateTree [3,9,20,null,null,15,7]

func (*Node) LevelOrder

func (th *Node) LevelOrder() [][]int

func (*Node) String

func (th *Node) String() string

Jump to

Keyboard shortcuts

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