code: public E extractMin() {
          if (size == 0) {
              throw new NoSuchElementException();
          }
          E result = storage.array[0];
          size--;
          if (size > 0) {
              storage.array[0] = storage.array[size];
              downHeap();
          }
          storage.array[size] = null;
  
          return result;
      }
docs: Retrieves and removes the element at the head of the queue (i.e., the minimum element in the queue).
  <p>
  Note: Unlike {@link #poll()}, this method throws a {@link NoSuchElementException} in case of an empty priority
  queue.
  
  @return the minimum element in the queue