docs: public static final <T> void offer(T[] heapKeys, double[] heapValues, int heapSize,
        T newKey, double newValue) {
      heapKeys[heapSize] = newKey;
      heapValues[heapSize] = newValue;
  
      int curIndex = heapSize;
      int parentIndex = (curIndex - 1) / 2;
      while (heapValues[curIndex] < heapValues[parentIndex]) {
        swap(heapKeys, heapValues, curIndex, parentIndex);
        curIndex = parentIndex;
        // Note that if curIndex = 0, parentIndex = curIndex so the loop test
        // will become false.
        parentIndex = (curIndex - 1) / 2;
      }
    }