mirror of
https://bitbucket.org/Mattrixwv/javaclasses.git
synced 2025-12-06 15:03:58 -05:00
Updated for performance
This commit is contained in:
@@ -820,8 +820,7 @@ public class Algorithms{
|
|||||||
}
|
}
|
||||||
//If there are more possible recurses, recurse with the current permutation
|
//If there are more possible recurses, recurse with the current permutation
|
||||||
else{
|
else{
|
||||||
ArrayList<String> temp = new ArrayList<String>();
|
ArrayList<String> temp = getPermutations(master, num + 1);
|
||||||
temp = getPermutations(master, num + 1);
|
|
||||||
perms.addAll(temp);
|
perms.addAll(temp);
|
||||||
//You need to swap the current letter with every possible letter after it
|
//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
|
//The ones needed to swap before will happen automatically when the function recurses
|
||||||
|
|||||||
Reference in New Issue
Block a user