code: private static int[] getFactors(int _value, int _max) {
        final int factors[] = new int[MAX_GROUP_SIZE];
        int factorIdx = 0;
  
        for (int possibleFactor = 1; possibleFactor <= _max; possibleFactor++) {
           if ((_value % possibleFactor) == 0) {
              factors[factorIdx++] = possibleFactor;
           }
        }
  
        return (Arrays.copyOf(factors, factorIdx));
     }
docs: Determine the set of factors for a given value.
  @param _value The value we wish to factorize.
  @param _max an upper bound on the value that can be chosen
  @return and array of factors of _value