I need to find all the permutations of a set of strings.
I did a google search for
java and found some examples that seem to work:
http://stackoverflow.com/questions/20906214/permutation-algorithm-for-array-of-integers-in-java
However, I found this cool C# code (below) that used lambdas to do the job in much less code! Now that Java 8 has lambdas, is there a nicer compact way to code this in Java 8 similar to the approach taken by C# below?
It seems to me we should have some java counterpart to the selectMany function that would accept some lambdas to implement a filter like C# does.
Thanks
Siegfried