~telemachus/algorithms

ref: fb191391624ddf8f29949589fea7e33c224193dd algorithms/binarysearchtree.go -rw-r--r-- 236 bytes
fb191391Peter Aronoff Start work on binary search tree 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package algorithms

type Node struct {
	parent *Node
	lChild *Node
	rChild *Node
	Count int
	Value int
}

type Tree struct {
	root *Node
	size int
}

func NewBST() *Tree {
	return &Tree{}
}

func (t *Tree) Size() int {
	return t.size
}