Documentation
¶
Index ¶
- func BFS(root *TreeNode)
- func InOrderRecursion(root *TreeNode) []int
- func InOrderStack(root *TreeNode) []int
- func PostOrderRecursion(root *TreeNode) []int
- func PostOrderStack(root *TreeNode) []int
- func PreOrderRecursion(root *TreeNode) []int
- func PreOrderStack(root *TreeNode) []int
- type AVL
- type BST
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostOrderRecursion ¶
PostOrderRecursion : 后序遍历的递归实现。
func PreOrderRecursion ¶
PreOrderRecursion : 前序遍历的递归实现。
Types ¶
type AVL ¶
AVL(Adelson-Velskii & Landis)树是带有平衡条件的二叉查找树(BST),其每个节点的左子树和右子树的高度最多差1。 查找、插入和删除在平均和最坏情况下的时间复杂度都是O(log(n))。
Click to show internal directories.
Click to hide internal directories.