Simple and Easy approach
\n\n# Code\n\nclass Solution {\npublic:\n    \n    bool isVowel(char ch) {\n    ch = tolower(ch); // Convert the character to lowercase for case-insensitivity\n
\n\n# Code\n```\nclass Solution {\npublic:\n    \n    bool isVowel(char ch) {\n    ch = tolower(ch); // Convert the character to lowercase for case-insensitivity\n    return (ch == \'a\' || ch == \'e\' || ch == \'i\' || ch == \'o\' || ch == \'u\');\n    }\n\n    string sortVowels(string s) {\n        int n=s.size();\n        string ans(n,\'-\');\n        vector<pair<int,char>> v;\n        for(int i=0;i<n;i++){\n            if(!isVowel(s[i])) ans[i]=s[i];\n            else {\n                v.push_back({(int)s[i],s[i]});\n            }\n        }\n        sort(v.begin(),v.end());\n        int j=0;\n        for(int i=0;i<n;i++){\n            if(ans[i]==\'-\'){\n                ans[i]=v[j++].second;\n            }\n        }\n        return ans;\n    }\n};\n```
['Sorting', 'C++']