D
DarkSoul
I have multiple ArrayLists, could be 2 or 3 or 10 lists, with multiple
values in them. Now what I need to do is to get a combination of all
of them.
For example, if I have 3 lists with the following values:
List 1: 3, 5, 7
List 2: 3, 5, 6
List 3: 2, 9
I would get these combinations
3, 3, 2
3, 3 , 9
3, 5, 2
3, 5, 9
3, 6, 2
3, 6, 9
5, 3, 2
5, 3, 9
5, 5, 2
5, 5, 9
5, 6, 2
5, 6, 9
etc etc....
Now the problem is I cannot do this easily because I do not know how
many lists I have, therefore determine how many loops I need.
values in them. Now what I need to do is to get a combination of all
of them.
For example, if I have 3 lists with the following values:
List 1: 3, 5, 7
List 2: 3, 5, 6
List 3: 2, 9
I would get these combinations
3, 3, 2
3, 3 , 9
3, 5, 2
3, 5, 9
3, 6, 2
3, 6, 9
5, 3, 2
5, 3, 9
5, 5, 2
5, 5, 9
5, 6, 2
5, 6, 9
etc etc....
Now the problem is I cannot do this easily because I do not know how
many lists I have, therefore determine how many loops I need.