private static long[][] twoMeans(long[] values, long middle) {
    List<Long> smaller = new ArrayList<Long>();
    List<Long> larger = new ArrayList<Long>();
    for (int i = 0; i < values.length; i++) {
      if (values[i] < middle) {
        smaller.add(values[i]);
      } else {
        larger.add(values[i]);
      }
    }

    long[][] result = new long[2][];
    result[0] = toArray(smaller);
    result[1] = toArray(larger);

    return result;
  }
The percentile method returns the least value from the given list which has at least given percentile.
@param values The list of values to find the percentile from
@param percentile The percentile
@return The least value from the list with at least the given percentile
app/com/linkedin/drelephant/math/Statistics.java