Documentation
¶
Index ¶
- type BST
- func (bst *BST) InOrderTraverse(f func(int))
- func (bst *BST) Insert(val int) *BST
- func (bst *BST) Max() (int, bool)
- func (bst *BST) Min() (int, bool)
- func (bst *BST) PostOrderTraverse(f func(int))
- func (bst *BST) PreOrderTraverse(f func(int))
- func (bst *BST) Remove(val int) bool
- func (bst *BST) Search(val int) bool
- type Node
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BST ¶
type BST struct {
// contains filtered or unexported fields
}
func (*BST) PostOrderTraverse ¶
PostOrderTraverse 后序遍历
type TreeNode ¶
type TreeNode struct {
// contains filtered or unexported fields
}
https://colobu.com/2020/07/15/implement-bst-in-Go/ 二叉搜索树(binary search tree,BST)也叫排序的二叉树,根节点比左边子树的所有节点都大,比右边子树上的所有节点都小
func NewTreeNode ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.