Skip to content
/ goBst Public

线程安全的二叉查找树 A threadsafe Binary Search Tree

Notifications You must be signed in to change notification settings

zheng-ji/goBst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goBst

Build Status GoDoc

A threadsafe Binary Search Tree written in Go

线程安全的二叉查找树

Installation

go get github.com/zheng-ji/goBst

Example

import (
	"fmt"
	bst "github.com/zheng-ji/goBst"
)

func main() {
	s := bst.NewBstTs()
	s.Insert(8)
	s.Insert(4)
	s.Insert(5)

	if s.Exists(4) {
        fmt.Println("exists")
    }

	s.ShowInOrder()
	s.ShowPreOrder()
	s.ShowPostOrder()
}

License

MIT

About

线程安全的二叉查找树 A threadsafe Binary Search Tree

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages