I have a list of objects dynamically created. MyObject is a custom object consisting of List of Items. So for example :
MyObject Instance1 has { a, b }
MyObject Instance2 has { x, y, z}
MyObject Instance3 has { 1, 2, 4, 5 }
...............
..............
MyObject InstanceN has { n1, n2 ............}
I want to be able to use either recursion or an iterative approach to solve the problem of generating all unique combinations.
How do I generate all unique combinations .. an output like this
{a, x, 1,......., n1}
{a, x, 1,......., n2}
{a, x, 2,......., n1}
{a, x, 2,......., n2}