I have a two dimentional array
like String twoDimentions ={
{ "A", "B", "C", "D", "E", "F" },
{ "A", "B", "C", "D", "E" },
{ "A", "B", "C", "D" },
{ "A", "B", "C" },
{ "A", "B","C","D" }
};
twoDimentional arry length will be dynamically changing.
two dimentional array having single dimentional arrays.
length of single dimentional array dynamically changing.
now i want comination of String like "AAAAA","AAAAB","AAAAC","AAAAD","AAABA","AAABB","AAABC","AAABD","AAACA","AAACB","AAACC","AAACD".................."FEDCD".
here "AAAAA" means each character from different arrays,
each element coming from different different arrays,
total no of strings (combinations) should be 1st array * 2nd array * 3rd array........
for above example it should be having 6*5*4*3*4 = 1440
each string length should be equals to size of twodimentional array. each string length should not less or greather than length of two dimentional array.
please give answer..........
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32687
4
posted
0
We don't simply give such answers. Please show us what you have achieved so far; pseudo-code might be the best thing to show us.
Then we shall be pleased to help with any problems you might encounter.
Piet Verdriet
Ranch Hand
Joined: Feb 25, 2006
Posts: 266
posted
0
JosAH gave you some pretty good hints here:
http://forums.sun.com/thread.jspa?threadID=5385583 The people over there also encouraged you to post your own efforts instead of asking for a spoon-fed-solution, which you didn't do.