1.0.1 • Published 10 years ago
lethexa-bintree v1.0.1
This is an implementation of a binary tree in javascript.
Installation
npm install
grunt
Usage
var bintree = require('lethexa-bintree');
var TestItem = function(value) {
this.getValue = function() {
return value;
};
};
var resultList = [];
var tree = new bintree.BinTree(0, 10, 0);
tree.registerItem(new TestItem(4));
tree.forEachInRange(0, 5, function(item) {
resultList.push(item);
});
console.log(resultList);
Contributors
- Lethexa