docs: public int percentile(int p) {
      if (p < 1 || p > 100) {
        throw new IllegalArgumentException("invalid percentile: " + p);
      }
      int count = 0;  // Count of values in the histogram.
      for (int i = 0; i < buckets.length; i++) {
        count += buckets[i];
      }
      if (count == 0) {  // Empty histogram.  Need to special-case it, otherwise
        return 0;        // the `if (count <= p)' below will be erroneously true.
      }
      // Find the number of elements at or below which the pth percentile is.
      p = count * p / 100;
      // Now walk the array backwards and decrement the count until it reaches p.
      for (int i = buckets.length - 1; i >= 0; i--) {
        count -= buckets[i];
        if (count <= p) {
          return bucketHighInterval(i);
        }
      }
      return 0;
    }