Retroactive/lib/data_structures/heap.js
function MinHeap(compareFn) {
  this._elements = [null];
  this._comparator = new Comparator(compareFn);

  Object.defineProperty(this, 'n', {
    get: function () {
      return this._elements.length - 1;
    }.bind(this)
  });
}
function MinHeap(compareFn) {
  this._elements = [null];
  this._comparator = new Comparator(compareFn);

  Object.defineProperty(this, 'n', {
    get: function () {
      return this._elements.length - 1;
    }.bind(this)
  });
}
function MinHeap ( compareFn ) { this . _elements = [ null ] ; this . _comparator = new Comparator ( compareFn ) ; Object . defineProperty ( this , 'n' , { get : function ( ) { return this . _elements . length - 1 ; } . bind ( this ) } ) ; }
Basic Heap structure
Basic Heap structure