Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void build(String [] array, String team, int size) {
- if (size == 0) {
- System.out.println(team);
- return;
- } else if (size > array.length) {
- return;
- } else {
- for (int i = 0; i < array.length; i++) {
- build(Arrays.copyOfRange(array, i + 1, array.length), team + array[i], size - 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement