code: function buildHeapFromNodeArray(heap, nodeArray) {
    heap.list = nodeArray;
    for (var i = Math.floor(heap.list.length / 2); i >= 0; i--) {
      heapify(heap, i);
    }
  }
docs: Builds a heap from a node array, this will discard the heap's current data.
  
  @private
  @param {BinaryHeap} heap The heap to override.
  @param {Node[]} nodeArray The array of nodes for the new heap.