code: private void findAndCacheMinimum(int firstBucket) {
          if (currentMin == null) {
              // find first non-empty bucket
              currentMinBucket = EMPTY;
              for (int i = firstBucket; i < this.buckets.length; i++) {
                  if (!buckets[i].isEmpty()) {
                      currentMinBucket = i;
                      break;
                  }
              }
              // find new minimum and its position (beware of cached values)
              currentMinPos = EMPTY;
              if (currentMinBucket >= 0) {
                  int pos = 0;
                  for (K val : buckets[currentMinBucket]) {
                      if (currentMin == null || compare(val, currentMin) < 0) {
                          currentMin = val;
                          currentMinPos = pos;
                      }
                      ++pos;
                  }
              }
          }
      }
docs: Helper method for finding and caching the minimum. Assumes that the heap
  contains at least one element.
  
  @param firstBucket
  start looking for elements from this bucket