Documentation
¶
Index ¶
- type TreeNode
- func (root *TreeNode) InOrder() []int
- func (root *TreeNode) InvertTree() *TreeNode
- func (root *TreeNode) InvertTreeRecursive() *TreeNode
- func (root *TreeNode) LevelOrder() [][]int
- func (root *TreeNode) LevelOrderRecursive() [][]int
- func (root *TreeNode) PostOrder() []int
- func (root *TreeNode) PreOrder() []int
- func (root *TreeNode) PreOrderRecursive() []int
- func (root *TreeNode) Predecessor() *TreeNode
- func (root *TreeNode) Successor() *TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeNode ¶
TreeNode 二叉树结点
func BuildTreeFromPostIn ¶
BuildTreeFromPostIn 从后序和中序构造二叉树
func BuildTreeFromPreIn ¶
BuildTreeFromPreIn 从前序和中序构造二叉树
func (*TreeNode) InvertTreeRecursive ¶
InvertTreeRecursive 翻转二叉树
func (*TreeNode) LevelOrderRecursive ¶
LevelOrderRecursive 层次遍历
func (*TreeNode) PreOrderRecursive ¶
PreOrderRecursive 前序遍历递归
Click to show internal directories.
Click to hide internal directories.