All possible combinations given a binary number
I have a 2D array which represents the binary numbers.
Given a 2D array of [count][posvalues], count refers to the number of binary, and posvalues refer to the possible values of each binary.
Ex. binary num: [0, 1] [0,1] [0,1]
Count = 3
Possible Values = 2 (given by 0 and 1)
I want to find all the possible combinations of everything in the array using a Recursive solution, but I'm having a hard time.
Please help me, it's driving me crazy!