code: @Override
      @ConstantTime
      @SuppressWarnings("unchecked")
      public K findMin() {
          if (size + insertionBufferSize == 0) {
              throw new NoSuchElementException();
          }
  
          if (insertionBufferSize == 0) {
              return array[0];
          } else if (size == 0) {
              return insertionBuffer[insertionBufferMinPos];
          } else {
              K insertionBufferMin = insertionBuffer[insertionBufferMinPos];
              if (comparator == null) {
                  if (((Comparable<? super K>) array[0]).compareTo(insertionBufferMin) <= 0) {
                      return array[0];
                  } else {
                      return insertionBufferMin;
                  }
              } else {
                  if (comparator.compare(array[0], insertionBufferMin) <= 0) {
                      return array[0];
                  } else {
                      return insertionBufferMin;
                  }
              }
          }
      }
docs: {@inheritDoc}