C++, sorting
Code\n\n// It\'s like counting sort\nclass Solution {\nprivate:\n    bool isVowel(char ch) {\n        return ch == \'a\' || ch == \'e\' || ch == \'o\' || ch == 
# Code\n```\n// It\'s like counting sort\nclass Solution {\nprivate:\n    bool isVowel(char ch) {\n        return ch == \'a\' || ch == \'e\' || ch == \'o\' || ch == \'u\' || ch == \'i\';\n    }\n\npublic:\n    string sortVowels(string s) {\n        vector<char> order = { \'A\', \'E\', \'I\', \'O\', \'U\', \'a\', \'e\', \'i\', \'o\', \'u\'};\n        unordered_map<char, int> M;\n\n        for (const auto& c : s) {\n            char ch = c;\n            if (isVowel(tolower(ch)))\n                M[c]++;\n        }\n\n        string result = "";\n        // find non zero freq char\n        int curr = 0;\n        for (; curr < order.size(); curr++) {\n            if (M.find(order[curr]) != M.end())\n                break;\n        }\n\n        for (const auto& c : s) {\n            // not a vowel\n            char ch = c;\n            if (!isVowel(tolower(ch))) {\n                result += c;\n                continue;\n            }\n\n            // if vowel\n            if (M[order[curr]] > 0) {\n                result += order[curr];\n            } else {\n                // next non-zero freq vowel\n                while (++curr < order.size()) {\n                    if (M.find(order[curr]) != M.end())\n                        break;\n                }\n                result += order[curr];\n            }\n            M[order[curr]]--;\n        }\n\n        return result;\n    }\n};\n```
['Hash Table', 'String', 'Sorting', 'Counting Sort', 'C++']