array-to-btree
Helper Method to flatten an array to Binary Tree
Last updated 6 years ago by rameshrm .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install array-to-btree 
SYNC missed versions from official npm registry.

ArrayToBtree Build Status

Summary

ArrayToBtree is a javcript implementation of building a "Binary tree" from an "Un-Ordered" array. The Tree is not a fully weighted binary tree, but provides an API to convert an array to a tree datastructure.

Installation

npm install -g array-to-btree

Sample Usage


var tree = require('array-to-btree');
var inputList = [3,5,8,9,11,12,13,15];
function build(input){
   return tree.toBTree(input);
}

Current Tags

  • 1.0.1                                ...           latest (6 years ago)

2 Versions

  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |