I have a number of ArrayList
with each ArrayList
having objects and each one can have different length. I need to generate permutation like in the below example:
Suppose I have 2 ArrayList
:
ArrayList
A
has objecta
, objectb
and objectc
ArrayListB
has objectd
, objecte
Then the output should be 6 new ArrayList
with these combinations:
Combination
1
objecta
and objectd
,
Combination2
objecta
and objecte
,
Combination3
objectb
and objectd
,
Combination4
objectb
and objecte
,
Combination5
objectc
and objectd
,
Combination6
objectc
and objecte
,
Can anyone help me?
See Question&Answers more detail:os