posted 16 years ago
Thanks for your help....
Actualy i also tried the same with one D array.
I have a 2D array like Object[n][m] where m=5 (Fixed), but n could be anything.
so the combination of elements should be generated according to no. of rows.
For Example:
Object[][] data={{ "A1","B1","C1" ,"D1","E1" },{ "A2","B2","C2" ,"D2","E2" },{ "A3","B3","C3" ,"D3","E3" },{ "A4","B4","C4" ,"D4","E4" },{ "A5","B5","C5" ,"D5","E5" }};
Result should be like this each (combination must be unique):
1st column will always have A's, 2nd column will always have B's, 3rd C's, 4th D's and 5th E's......
A1B1C1D1E1....Correct combs
A1B2C1D1E1
A2B1C1D1E1
A2B2C1D1E1
.........................
B1A1C1D1E1...wrong combination( At 1st place only A should be entertain)
........................ and so on....
I'll appriciate your help on this.