摘要:
package main import "fmt" type BPlustree map[int]node //定义 func NewBplusTree() *BPlustree { bt := BPlustree{} //初始化 leaf := NewLeafNode(nil) //叶子节点 r 阅读全文
摘要:
package main import ( "fmt" "math/rand" "time" ) //B树的节点 type BtreeNode struct { Leaf bool //是否叶子 N int //分支的数量 keys []int //存储数据 Children []*BtreeNod 阅读全文
摘要:
package main //定义常量红黑 const ( RED = true BLACK = false ) //红黑树结构 type RBNode struct { Left *RBNode //左节点 Right *RBNode //右边节点 Parent *RBNode //父亲节点 Co 阅读全文
摘要:
package main import ( "bytes" "container/list" "fmt" "strconv" ) type Node struct { Data int //数据 Left *Node //指向左边节点 Right *Node //指向右边节点 } type Bina 阅读全文