bst
A basic Binary Search Tree implementation in JavaScript.
Install
npm install bst
bower install bst
Usage
var bst = ; var bst = ;bst;bst;bst;bst;bst;bst;console; /*{ "value": 3, "left": { "value": 2, "left": { "value": 1, "left": null, "right": null }, "right": { "value": 2, "left": null, "right": null } }, "right": { "value": 3, "left": null, "right": { "value": 4, "left": null, "right": { "value": 5, "left": null, "right": null } } }}*/ bst; console; /*{ "value": 3, "left": { "value": 3, "left": { "value": 4, "left": { "value": 5, "left": null, "right": null }, "right": null }, "right": null }, "right": { "value": 2, "left": { "value": 2, "left": null, "right": null }, "right": { "value": 1, "left": null, "right": null } }}*/
Test
npm test
License
MIT