F
Frank Oquendo
This should be easy but I'm drawing a blank. I have N arrays of strings.
Each array has X elements. I need to output every possible combination
of these strings as follows:
1) Array1 = {"A"}
2) Array2 = {"B", "C"}
3) Array3 = {"D", "E", "F"}
The output should be:
A
A.B
A.B.D
A.B.E
A.B.F
Since I won' know how many arrays will be passed in until runtime, I'm
thinking a recursive function is the way to go but I've yet to produce
anything useful. Any ideas?
--
There are 10 kinds of people. Those who understand binary and those who
don't.
http://code.acadx.com
(Pull the pin to reply)
Each array has X elements. I need to output every possible combination
of these strings as follows:
1) Array1 = {"A"}
2) Array2 = {"B", "C"}
3) Array3 = {"D", "E", "F"}
The output should be:
A
A.B
A.B.D
A.B.E
A.B.F
Since I won' know how many arrays will be passed in until runtime, I'm
thinking a recursive function is the way to go but I've yet to produce
anything useful. Any ideas?
--
There are 10 kinds of people. Those who understand binary and those who
don't.
http://code.acadx.com
(Pull the pin to reply)