Let's say input array is
[a0,a1,a2],[b0,b1], [c0,c1]
]
And expected output something like this
a0 b0 c0,
a0 b0 c1,
a0 b1 c0,
a0 b1 c1
a1 b0 c0,
a1 b0 c1,
a1 b1 c0,
a1 b1 c1
.......
a2 b1 c1
After writing out longhand these combinations I can sense patterns, like there are some fixed positions and then index moves from left to right, then left again and everything but cannot wrap my head around the multidimensionallity and how to implement? Loop inside loop inside loop, recursion or what? I am looking for general directions.
Any suggestions and tips would be much appreciated