[C++] char counter table
\nclass Solution {\npublic:\n    string sortString(string s) {\n\n        int char_counter[26] = {0};\n        for(auto& c : s) ++char_counter[c-\'a\'];\n\n    
```\nclass Solution {\npublic:\n    string sortString(string s) {\n\n        int char_counter[26] = {0};\n        for(auto& c : s) ++char_counter[c-\'a\'];\n\n        int count=0;\n        while(count < s.size()) {\n            for(int i=0; i<26; ++i) {\n                if(char_counter[i]-- > 0) s[count++] = i+\'a\';\n            }\n\n            for(int i=26-1; i>=0; --i) {\n                if(char_counter[i]-- > 0) s[count++] = i+\'a\';\n            }\n        }\n\n        return s;\n\n    }\n};\n```
['C', 'C++']