code: @Override
      @LogarithmicTime(amortized = true)
      public K deleteMin() {
          if (size == 0) {
              throw new NoSuchElementException();
          }
  
          // updated last deleted key
          lastDeletedKey = currentMin;
  
          if (currentMinBucket == 0) {
              buckets[currentMinBucket].remove(currentMinPos);
  
              // update minimum cache
              currentMin = null;
              currentMinBucket = EMPTY;
              currentMinPos = EMPTY;
              if (--size > 0) {
                  findAndCacheMinimum(0);
              }
          } else {
              K newMin = null;
              int newMinBucket = EMPTY;
              int newMinPos = EMPTY;
  
              // redistribute all elements based on new lastDeletedKey
              int pos = 0;
              for (K val : buckets[currentMinBucket]) {
                  if (pos != currentMinPos) {
                      int b = computeBucket(val, lastDeletedKey);
                      assert b < currentMinBucket;
                      buckets[b].add(val);
  
                      if (newMin == null || compare(val, newMin) < 0) {
                          newMin = val;
                          newMinBucket = b;
                          newMinPos = buckets[b].size() - 1;
                      }
                  }
                  ++pos;
              }
              buckets[currentMinBucket].clear();
  
              // update minimum cache
              currentMin = newMin;
              currentMinBucket = newMinBucket;
              currentMinPos = newMinPos;
              if (--size > 0) {
                  findAndCacheMinimum(currentMinBucket + 1);
              }
          }
  
          return lastDeletedKey;
      }
docs: {@inheritDoc}
  
  The cost of this operation is amortized O(logC) assuming the heap
  contains keys in the range [0, C] or equivalently [a, a+C].