
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
js-tree-utils
Advanced tools
Includes a standard Binary Search Tree, AVL Tree and Red-Black Tree.
Please star if you like this repo :)
$ npm install node-tree --save
Worst case big O notation:
Include a binary search tree:
var BinarySearchTree = require('node-tree').BinarySearchTree;
Create Binary Search Tree and optionally pass in options:
var options = {
// options here
};
var btree = new BinarySearchTree(options);
Insert records (key, value):
btree.insert(12, 'test');
Check if tree contains a key:
var key = btree.contains(5);
console.log('Has 5?: ', key);
Return the tree in order:
var list = btree.inOrder();
Get the max key of tree:
btree.maxKey()
Get the min key of tree:
btree.minKey()
Get the size of tree:
btree.size()
Worst case big O notation:
Include a avl search tree:
var AvlTree = require('node-tree').AvlTree;
Create AVL and optionally pass in options:
var options = {
// options here
};
var avlTree = new AvlTree(options);
An Avl Tree has the same methods available as the standard BST.
FAQs
Node Binary Search Tree Library
We found that js-tree-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.