thelordoftherings
Programmer
Hello,
This is more a thinking question rather than pure Java question, but since I participate in this forum and I don't know where else would it go I decided to put it here.
Let's say I have an array. I need a function (even
pseudocode) that prints the whole possible combinations of it.
For example, if my Array is A B C, the output will be:
A
AB
ABC
ABCD
ABD
AC
ACD
AD
B
BC
BCD
BD
C
CD
D
Any ideas...?
Roy
This is more a thinking question rather than pure Java question, but since I participate in this forum and I don't know where else would it go I decided to put it here.
Let's say I have an array. I need a function (even
pseudocode) that prints the whole possible combinations of it.
For example, if my Array is A B C, the output will be:
A
AB
ABC
ABCD
ABD
AC
ACD
AD
B
BC
BCD
BD
C
CD
D
Any ideas...?
Roy