We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea81040 commit 333fa71Copy full SHA for 333fa71
1 file changed
swordoffer/PermutationSolution.java
@@ -1,8 +1,9 @@
1
/**
2
- * 剑指Offer,字符串的排列
+ * ½£Ö¸Offer£¬×Ö·û´®µÄÅÅÁÐ
3
*/
4
5
import java.util.ArrayList;
6
+import java.util.Collections;
7
public class PermutationSolution {
8
9
public static void main(String[] args) {
@@ -20,7 +21,9 @@ public static ArrayList<String> Permutation(String str) {
20
21
r = new ArrayList<>();
22
StringBuilder sb = new StringBuilder(str);
23
perm(sb, 0);
24
+ Collections.sort(r);
25
return r;
26
+
27
}
28
29
public static void perm(StringBuilder sb, int start){
0 commit comments