I am trying to make a list of 2-dimensional arrays, filled with every possible combination, allowing to speak 1,2,3,4 recursively. without double take-offs.
eg.
1,0,0
2,0,0
3,0,0
4,0,0
1,2,0
1,3,0
1,4,0
1,2,3
, etc ...
still i
for(int i =0;i<arraySize;i++)
index[i] = i;
for(int i = 0;i<arraySize;i++){
for(int x = 0;x<k;x++)
combinations.get(i).set(x, index[i]);
EDIT: Also, I am not trying to print the result that I want to save in a two-dimensional array
source
share