There is a problem like
I have 3 arrays i,j, & k ( the array count can be anything)
i j k
_____________
2 4 7
3 5 8
6 9
A combination has to be created like
(2,4,7) , (2,4,8) , (2,4,9) , (2,5,7) , (2,5,8) , (2,5,9) , (2,6,7) ,(2,6,8) , (2,6,9)
(3,4,7) , (3,4,8) , (3,4,9) , (3,5,7) , (3,5,8) , (3,5,9) , (3,6,7) ,(3,6,8) , (3,6,9)
But the problem here is , i will have the count of the no of arrays at runtime, but to get the combination described above , the depth of looping is not known , so how to create dynamic loops .
If possible through recursion, how ?Any idea