add bst
This commit is contained in:
parent
20a4e1a89d
commit
8910fced57
@ -32,7 +32,7 @@ type BinaryTree[Key cmp.Ordered] struct {
|
|||||||
|
|
||||||
func NewBinaryTree[Key cmp.Ordered](capacity int) (bst *BinaryTree[Key]) {
|
func NewBinaryTree[Key cmp.Ordered](capacity int) (bst *BinaryTree[Key]) {
|
||||||
tree := make(Binary[Key], 1, capacity)
|
tree := make(Binary[Key], 1, capacity)
|
||||||
bst = &BinaryTree[Key]{ Binary: &tree }
|
bst = &BinaryTree[Key]{ Binary: &tree, least: 0, greatest: 0, lastNode: 0 }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user