✅Easy to understand ||🔥98% beats🔥|| C++✅
\n\n# Complexity\n- Time complexity: O(nlogn)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(N)\n Add your space complexity here, e.g. O(n
\n\n# Complexity\n- Time complexity: O(nlogn)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    string sortVowels(string s) {\n        vector<char>vowels;\n\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\'||s[i]==\'a\'||s[i]==\'e\'||s[i]==\'i\'||s[i]==\'o\'||s[i]==\'u\'){\n                vowels.push_back(s[i]);\n            }\n        }\n        sort(vowels.begin(),vowels.end());\n\n        int j =0;\n\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\'||s[i]==\'a\'||s[i]==\'e\'||s[i]==\'i\'||s[i]==\'o\'||s[i]==\'u\'){\n                s[i]=vowels[j];\n                j++;\n            }\n        }\n        return s;\n    }\n};\n```
['String', 'Sorting', 'C++']