heap-it
v1.0.1
Published
a binary min-heap
Downloads
1
Readme
heapIt
a minimum heap!
To run tests
install mocha -g
npm test
ormocha --compilers js:babel-register --recursive
Usage
It is important to note that .default
has to be referenced explicitly in order to obtain the class from the module. More info here.
var Heap = require("heap-it").default
var heap = new Heap()
heap.insert(14)
heap.insert(9)
heap.insert(11)
heap.insert(5)
console.log(heap.list)
// [ 0, 5, 9, 11, 14 ]