Skip to content

quasoft/btree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

btree

Package btree is simple binary tree implementation that can store any value type that implements ValueInterface.

This implementation is a modified version of golang/tour/tree.go, adapted to store values of custom types.

Currently does NOT support balancing.

Initially created for use in a voronoi diagram generator.

How to use:

import "github.com/quasoft/btree"

tree := btree.New(IntValue(42))
tree.Insert(IntValue(24))
tree.Insert(IntValue(3))
tree.Insert(IntValue(43))

fmt.Print(tree)

// Output: (((3) 24) 42 (43))

About

Simple binary tree implementation in Golang with interface value.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages