Generate combinations by order and fixed length.
- by roconmachine
Suppose there is array
main[] = [a,b,c,....z];
a[] = [a1,a2,a3,....] ,
b[] = [b1,b2,b3,....]
and so on.
So if we generate combination in main.length of ordered then it looks like .....
a1 b1 c1, a1 b1 c2, a1 b1 c3 ......
a1 b2 c1, a1 b3 c1, .....
a2 b1 c1, a3 b1 c1, .....
and total count will be a.length * b.length * c.length ........ = ?
So write a code in any language to generate those combination. all the best.
alex