@@ -0,0 +1,804 @@
+package com.github.renszarv.algobase;%0A%0Aimport java.util.Arrays;%0A%0A/**%0A * Class which iteratively checks all the combination, where in all the posib%0A * @author zsombor%0A *%0A */%0Apublic class Combinator %7B%0A%0A%09private final int%5B%5D max;%0A%09private int%5B%5D current;%0A%09%0A%09public Combinator(int... max) %7B%0A%09%09this.max = max;%0A%09%09current = new int%5Bmax.length%5D;%0A%09%7D%0A%09%0A%09public void copyCurrent(int%5B%5D result) %7B%0A%09%09System.arraycopy(current, 0, result, 0, current.length);%0A%09%7D%0A%09%0A%09public boolean inc() %7B%0A%09%09for (int i=0;i%3Cmax.length;i++) %7B%0A%09%09%09current%5Bi%5D ++;%0A%09%09%09if (current%5Bi%5D %3C max%5Bi%5D) %7B%0A%09%09%09%09return true;%0A%09%09%09%7D else %7B%0A%09%09%09%09current%5Bi%5D = 0;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%09%0A%09%0A%09%0A%09public static Combinator createArray(int length, int value) %7B%0A%09%09int%5B%5D maxes = new int%5Blength%5D;%0A%09%09Arrays.fill(maxes, value);%0A%09%09return new Combinator(maxes);%0A%09%7D%0A%09%0A%09%0A%09%0A%7D%0A

Add trivial Combinator class