Updated for performance

This commit is contained in:
2020-06-17 17:27:08 -04:00
parent eb44a6d6f3
commit 768dc0c761

View File

@@ -820,8 +820,7 @@ public class Algorithms{
}
//If there are more possible recurses, recurse with the current permutation
else{
ArrayList<String> temp = new ArrayList<String>();
temp = getPermutations(master, num + 1);
ArrayList<String> temp = getPermutations(master, num + 1);
perms.addAll(temp);
//You need to swap the current letter with every possible letter after it
//The ones needed to swap before will happen automatically when the function recurses