code: private static int heapDelete(int[] heap, int[] reverseIndex, int count, int heapIndex, float[] values)
    {
      int end = count - 1;
  
      reverseIndex[heap[heapIndex]] = -1;
  
      heap[heapIndex] = heap[end];
      reverseIndex[heap[heapIndex]] = heapIndex;
  
      end--;
      siftDown(heap, reverseIndex, heapIndex, end, values);
      return count - 1;
    }
docs: Deletes an item from the min-heap and updates the reverse index
  
  @param heap         min-heap stored as indices into the array of values
  @param reverseIndex reverse index from the array of values into the heap
  @param count        current size of the heap
  @param heapIndex    index of the item to be deleted
  @param values       values stored in the heap