We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee997c7 commit d8aa32eCopy full SHA for d8aa32e
Test
@@ -0,0 +1,10 @@
1
+import java.util.Arrays;...
2
+public class Order {
3
+public static String order(String words) {
4
+String[] strs = words.split(" ");
5
+arrays.sort(strs, (String s1, String s2) -> s1.replaceAll("[a-zA-Z]","").compareTo(s2.replaceAll("[a-zA-Z]","")) );
6
+String f = "";
7
+for(String st:strs) f+=st + " ";
8
+return f.substring(0,f.length()-1);
9
+}
10
0 commit comments