I am looking for an non-recursive algorithm or C code to generate all combinations of multiple sets (not sure if that's the correct scientific name). For example:
I have N=2 sets of symbols:
set 1: [A, Y, Z]
set 2: [1, Q]
The output should be:
A1
AQ
Y1
YQ
Z1
ZQ
N can vary, same as the number of symbols in particular set. Thanks in advance for any help! :)