moveUp_(index) {
    const nodes = this.nodes_;
    const node = nodes[index];

    // While the node being moved up is not at the root.
    while (index > 0) {
      // If the parent is greater than the node being moved up, move the parent
      // down.
      const parentIndex = this.getParentIndex_(index);
      if (nodes[parentIndex].getKey() > node.getKey()) {
        nodes[index] = nodes[parentIndex];
        index = parentIndex;
      } else {
        break;
      }
    }
    nodes[index] = node;
  }
Moves the node at the given index up to its proper place in the heap.
@param {number} index The index of the node to move up.
@private