Easy Java Solution || 100% faster
\nclass Solution {\n    public String sortString(String s) {\n        int[] count = new int[26];\n        for (char ch : s.toCharArray()) {\n            count[c
```\nclass Solution {\n    public String sortString(String s) {\n        int[] count = new int[26];\n        for (char ch : s.toCharArray()) {\n            count[ch - \'a\']++;\n        }\n        StringBuilder sb = new StringBuilder();\n        int length = s.length();\n        while (length > 0) {\n            for (int i = 0; i < 26; i++) {\n                if (count[i] > 0) {\n                    count[i]--;\n                    sb.append((char) (i + \'a\'));\n                    length--;\n                }\n            }\n            for (int i = 25; i >= 0; i--) {\n                if (count[i] > 0) {\n                    count[i]--;\n                    sb.append((char) (i + \'a\'));\n                    length--;\n                }\n            }\n        }\n        return sb.toString();\n    }\n}\n```\nfeel free to ask any questions
['Java']