vimala v

vimala v

  • NA
  • 4
  • 7.7k

Generate combinations of multiple arrays dynamically

Jan 7 2015 8:19 AM
Hi,
I want to generate combinations from multiple array elements.
A1={a,b,c} & A2={d,e,f} & A3={1,2,3}
My result should be a,b,c,d,e,f,1,2,3,ad,ae,af,bd,be,bf,cd,ce,cf,a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3,e1,e2,e3,f1,f2,f1,ad1,ad2,ad3,ae1,ae2,ae3,af1,af2,af3,bd1,bd2,bd3,...
I am able to generate this when the source list is given.But i want to achieve the same  when the source is N and the elements in each array is N.
Please help to generate combinations. 

Answers (2)