tree

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

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

Go to latest
Published: Jun 10, 2020 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 struct {
	Left, Right *Node
	// contains filtered or unexported fields
}

结构体:节点定义

func CreateNode

func CreateNode() *Node

struct赋值方法

func (Node) Print

func (node Node) Print()

结构体定义方法 参数传递方式:传值 值接收者

func (*Node) Traverse

func (node *Node) Traverse()

接收者允许为空指针nil nil可以调用方法,因此在遍历时不需要判断节点是否为nil

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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