Red-Black BST
Implementation of Algs4 Red Black BST in javascript with no dependencies.
This project is an implementation of red-black binary search for multi purpose. Common uses are: data caching, sort, indexing, etc...
Usage
$ npm i red-black-bst
const BST = ; const bst = ; bst console
API
CRUD
Methods for create, read, update and delete nodes in tree.
Create or Update
Creating or update node in tree.
bst
Read
Get key content in tree.
bst
Delete
bst
Query
Methods for query in the tree.
min
Get min key in the tree.
bst
max
Get max key in the tree.
bst
rank
Get number of keys less than key queried.
bst
select
Get data in the by rank position.
bst
floor
Get key less then or equal key queried.
bst
ceilling
Get key greater then or equal key queried.
bst
keys in range
Get all keys between interval keys queried.
bst