Hi,
I know it is very easy, but I just can't fngure out the algorithm.
For example: I have these:
string[] a={"1","2"};
string[] b={"a","b" "c"};
string[] c={"d","e","f"};
How to write an algorithm to print all the combinations like:
1 a d
1 a e
1 a f
2 a d
2 a e
2 a f
1 b d
1 b e
1 b f
2 b d
2 b e
2 b f
1 c d
1c e
1 c f
2 b d
2 b e
2 b f
.....
The best I got is to remember the one has most strings and printthem
first. Then loop through. Can someone provide me a formal algorithm to
handle it?
Thanks