I am asking for help to figure out all possible combinations for these sets A1orA2,B1orB2,C1orC2,D1orD2,E1orE2
I attached a picture that is how I want it. And you can only have 1 or 2 in each combination, not both. EX - A1 or A2
Thank you
Here is the combination i want(https://i.stack.imgur.com/qe93y.jpg)?
Adapting this answer about how to generate coin flips.
We can use the following code
It takes a array of values and then recursively goes down the "length" of the array branching at each point with a "1" or a "2" and slicing off the front of the array.