As part of my study on fundamentals, i have implemented following in Javascipt for MinHeap data-structure. Please have a look and i look forward to your feedback for any improvements. const swap = require(‘../swap’); function Heap(){ this.heap = []; } Heap.prototype.getParent = function(index){ return (index-1)/2; } Heap.prototype.getLeft = function(index){ return (2*index)+1; } Heap.prototype.getRight = function(index){Read more