package
Version:
v0.0.0-...-2159114
Opens a new window with list of versions in this module.
Published: Aug 20, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Node struct {
Value int
Left, Right *Node
}
结构体
Go中只有封装,没有继承和多态
func CreateNode(testValue int) *Node
自定义工厂函数
func (node *Node) SetValue(value int)
值传递
func (node Node) SetValue(Value int) {
node.Value = Value
}
编译器自动识别都地址的值或者指针
指针作为方法的接收者
func (node *Node) Traverse()
中序遍历
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.