I have about 10 arrays (this number is a variable, can be more or less) with a certain number of elements in each (again number fo elements can vary for each array).
I need to create all combinations of these arrays.
A simple ex:
Array1: 1,2
Array2: 4
Array3: 5,6
Output should be
1 4 5
1 4 6
2 4 5
2 4 6
Would recusion be a good way of doing it?
Or is there any other approach?