print-bst
Binary Search Tree Implementation with Print Tree Functionality
Usage
const BinarySearchTree = ; let bst = ;bst; // insert one elementbst;bst;console; // will print tree // _30 // / \ // 21 42 bst; // insert array of elements at a timeconsole; // will print tree // _______30______ // / \ // _21 _42 // / \ / \ // _14 25 _34 54// / \ / // 12 28 32 bst; // remove elementbst; // remove elementconsole; // will print tree // ____30______ // / \ // _25 _54// / \ / // _14 28 _34 // / / // 12 32 bst; // returns truebst; // returns false