Algorithm for Finding out combinations from Arrays
Can anybody point me the generic algorithm for making combinations from Arrays.
eg : two String arrays - { "Red" , "Blue" } and another { "10" , "20" ,"30" }
Result should be
{{ "Red" , "10"} , { "Red" , "20" } , { "Red" , "30" } , { "Blue", "10" } , { "Blue", "20"} , { "Blue" , "30" } }
I can have any number of Arrays and the number of Arrays will vary from time to time.
String[] { "Red" , "Blue" , "Yellow" }
String[] { "10", "20", "30" };
String[] { "Prints" ,"Stripes"}
Some other case it can be 5 such arrays
Please help
Thanks
Joseph

