Simple C++ solution using frequency array..!
Intuition\n Describe your first thoughts on how to solve this problem. \nUsing frequency array to store the vowels frequency.\n\n# Approach\n Describe your appr
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nUsing frequency array to store the vowels frequency.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nStep-1 = iterate through the string to find the frequencies of vowels in string s and make the vowels as \'*\' so that we can update later.\n\nStep-2 = Now create a string called "vowels" which contains all the vowels of string s in sorted order (you can understand better by looking at code).\n\nStep-3 = Now iterate through string and when ever you find \'*\' just update it by vowel[j] and increment  j value.\n\n# Complexity\n- Time complexity:O(n)\n\n- Space complexity:O(26)+O(26)\n\n# Code\n```\nclass Solution {\npublic:\n    string sortVowels(string s) {\n        string check ="AEIOU";\n\n       int lower[26] = {0}; \n        int upper[26] = {0};\n        for(int i=0;i<s.size();i++){\n             if(s[i]==\'a\' || s[i] ==\'e\'|| s[i]==\'i\' || s[i]==\'o\' || s[i]==\'u\'){\n                lower[s[i]-\'a\']++;\n                 s[i]=\'*\';\n            }\n            if(s[i]==\'A\' || s[i] ==\'E\'|| s[i]==\'I\' || s[i]==\'O\' || s[i]==\'U\'){\n                upper[s[i]-\'A\']++;\n                s[i]=\'*\';\n            }\n        }\n        string vowels ="";\n        for(int i=0;i<26;i++){\n            char ch = i+\'A\';\n            while(upper[i]){\n                vowels+=ch;\n                upper[i]--;\n            }\n        }\n        for(int i=0;i<26;i++){\n            char ch = i+\'a\';\n            while(lower[i]){\n                vowels+=ch;\n                lower[i]--;\n            }\n        }\n        int j=0;\n        int i =0;\n        while(j<vowels.size()&& i<s.size()){\n            if(s[i]==\'*\'){\n                s[i]= vowels[j];\n                j++;\n            }\n            i++;\n        }\n        return s;\n\n\n        \n\n    }\n};\n```
['C++']