binary-heap-ds

Binary Heap implementation in JavaScript

Usage no npm install needed!

<script type="module">
  import binaryHeapDs from 'https://cdn.skypack.dev/binary-heap-ds';
</script>

README

binary-heap

Binary Heap implementation in JavaScript

Installation & Usage :


npm install binary-heap-ds

const BinaryHeap = require("binary-heap-ds");

let bh = new BinaryHeap();
bh.insert(10); //Inserts 10 to the heap
bst.extractMax(); // pops max value out of the heap and adjusts rest of the heap