code: public static int sturges(int n) {
          int k = (int) Math.ceil(Math.log2(n) + 1);
          if (k < 5) k = 5;
          return k;
      }
docs: Returns the number of bins by Sturges' rule k = ceil(log2(n) + 1).
  @param n the number of data points.
  @return the number of bins