Quote:
Originally Posted by Slowmo
hi there,
i have a huge problem. I have x (selected during runtime) stringsarrays with y values (selected during ruintime, too) each. Now i need a algorithm, which searches all possible combinations of the y stringarrays.
Example (input fom user)
string[] para1 = {"A1","A2"};
string[] para2 ={"B1","B2"" ,"B3"};
string[] para3 ={"C1","C2","C3"};
A1,B2,C3
A2,B1,C1
etc....
Thanks for you help
Posting tips about asking for entire solutions.
I suggest a little bit of google searching about "calculating combinations and permutations" followed by some attempts on your own. Don't search for a code solution that does the work for you. Search for an understanding of the concepts behind combinations, then work up code that achieves your needs.
How would you do it on paper? If you were going to figure out all the combinations how would you write them all out?
A1, B1, C1
A1, B1, C2
A1, B1, C3
[...]
A1, B2, C1
A1, B2, C2
[...]
Now take a stab at the code that would follow this same pattern of behavior.
Regards,
tlhIn'toQ