1.0.9 โ€ข Published 6 years ago

mybinaryheap v1.0.9

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

BinaryHeap

This is a simple BinaryHeap heap Implementation in nodejs, without dependencies

FunctionsAverageWorst case
pushO(1)O(log n)
lowerO(1)O(1)

๐Ÿ—ƒ๏ธPre-Requisites

๐Ÿ› ๏ธ Usage

let BinaryHeap = require("mybinaryheap");

let binaryHeap = new BinaryHeap(2); // limit is set to 2 elements
binaryHeap.push(2);
binaryHeap.push(1);
binaryHeap.push(3);
console.log(binaryHeap.lower()); //  "2"

Contributing

โš ๏ธ Tests

npm install
npm run test

๐Ÿ—ƒ๏ธ Docs

npm run doc

=]

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago