This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.collect.Lists; | |
import java.util.List; | |
public class ListPermutation { | |
public static void main(String[] args) { | |
for (int i = 0; i <= 6; i++) { | |
System.out.println("Take " + i + " of 5: " + permutations(Lists.newArrayList(1, 2, 3, 4, 5), i)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
public class ListPermutation { | |
public static void main(String[] args) { | |
for (int i = 0; i < 6; i++) { |