I have four letters: A B C D, I need to calculate all the combinations on the follow type:
A - B A - C A - D A - BC A - BD A - CD A - BCD AB - C AB - CD AB - D ABC - D
As you can see no letters are repeated LEFT - RIGHT, IF the letter is on the left it is not repeated on the right again. I need a method to generate all those possible combinations.
the order of the combinations is not important, If I use ABC I don't need other combinations with CBA or BAC, as you cann see I wrote:
A - BC
A - CB
I Need all the combinations that 4 letters could generate without repeating the same letter on left and on the right.
Could someone help me?