Hello StackOverflow community !
I need this :
List<String> s1 = Arrays.asList(new String[] {"A0","B0","C0","D0"});
List<String> s2 = Arrays.asList(new String[] {"E0","F0","G0","H0"});
int iteration = 3;
List<String> result = permutations(s1,s2,iteration);
//result should contain : "A0E0B0F0C0G0", "A0E0B0F0D0H0",...
//result should not contain : some String begining with E0 in this example
//result should not have duplicate values
//Expected behaviour :
//Pick one of the strings from s1, pick one of the strings from s2.
//Concatenate both. Repeat this process "iteration" times.
I found this : Substituting a for-loop with all permutations of an array - Java
It's useful but I don't know how to change it for my code.
Any idea ?