2.2.0 • Published 4 years ago
most-trees v2.2.0
> npm install most-trees
const { ExpressionTree, BinaryTree } = require('most-trees');
let expTree = new ExpressionTree('3x*(2x+2)-83');
let bst = new BinaryTree([1, 2, 5, -51, 3, -14]);
bst.insert(142);
if (bst.search(3)) if (bst.remove(3)) console.log('removed 3 from tree');
console.log(bst.toArray()); //logs [-51, -14, 1, 2, 5, 142]
> npm install
> npm test