Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/richardjimenezyolo/binary-search-tree

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/richardjimenezyolo/binary-search-tree

  • v0.0.0-20200905143829-6eb65aa4b33e
  • Source
  • Go
  • Socket score

Version published
Created
Source

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

FAQs

Package last updated on 05 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc