Skip to content

richardjimenezyolo/Binary-Search-Tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Search Tree Package for the Golang programing language

A simple implementation of a binary search tree in go

This package is just a simple way to use binaries search tries. For the moment this package can only work with integers.

Create a Tree

var Tree bst.Node;

Insert a number into the Tree

Tree.Insert(2) // Instead of 2 you can use any number you want

Remove elements from the Tree

Tree.Remove(5) // Instead of 5 you can use any number you want

Get the smallest number

SmallestNumber := Tree.GetMin()

Get the biggest number

BigNumber := Tree.GetMax()

Get the tree sorted

sort := Tree.Sort() // Return a sorted array

Get the tree sorted backwards

SortInv := Tree.SortInv() // returns a sorted array but backwards

Check if a node exist in the tree

check := Tree.Check(2) //Instead of 2 you can use any number you want

About

A simple implementation of a binary search tree in go.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages