1.0.1 • Published 10 years ago

lethexa-bintree v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

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
1.0.1

10 years ago

1.0.0

10 years ago