Using Map || Very simple & easy to understand solution
\n\n# Code\n\nclass Solution {\npublic:\n    unordered_set<char> vowel{\'a\', \'e\', \'i\', \'o\',\'u\', \'A\', \'E\', \'I\', \'O\',\'U\'};\n        \n    bool 
\n\n# Code\n```\nclass Solution {\npublic:\n    unordered_set<char> vowel{\'a\', \'e\', \'i\', \'o\',\'u\', \'A\', \'E\', \'I\', \'O\',\'U\'};\n        \n    bool check(char c){\n        return (vowel.find(c) != vowel.end());\n    }\n    \n    string sortVowels(string s) {\n        map<int, int> mp;\n        for(auto c: s) if(check(c)) mp[c]++;     //put all vowel in the map with frequency \n        map<int, int>::iterator it = mp.begin(); //set an iterator to the begining of the map\n        for(int i = 0; i < s.size(); ++i){\n            if(check(s[i])) {                    //check for vowel letter then replace this with sorted vowel\n                s[i] = (*it).first;              //from the map get the first key(vowel) which is non zero\n                if(--(*it).second ==  0) it++;   //decrease the frequency of the vowel and if zero, then move iterator to next vowel\n            }\n        }\n        return s;\n    }\n};\n```
['C++']