What type of permutation tree

Associate
Joined
19 Jan 2011
Posts
658
Hi what type of permutation tree is this

A1
/ | \
B1 B2 B3
/ \ / \ / \
C1 C2 C1 C2 C1 C2

A1 B1 C1
A1 B1 C2
A1 B2 C1
A1 B2 C2
A1 B3 C1
A1 B3 C2

1x3x2 = 9 options

Currently got lots nested for loop's to work out all options
for (i=0,i < A[n], i++)
for (j=0,j < B[n], j++)
for (k=0,k < C[n], k++)
print A B[j] C[k]

I want something better though i just don't feel this is best way
thanks :)
 
Yer 6 ! !
Thanks , this is just a example that is simplified I have 6 arrays that could have up to 1-3 options in each
I'll read up more and hopefully it will click
 
Back
Top Bottom