JUST SORT VOWELS || EASY || C++ || SORT
Intuition\nSorting the vowels by taking them in a new string\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n1-Declare a string for
# Intuition\nSorting the vowels by taking them in a new string\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n1-Declare a string for storing vowels.\n2-Sort the string by simple sort function.\n3-Just store the vowels in the original string and finally return it.\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n)\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        if(s.size() == 1) return s;\n        int sz = s.size();\n        int i=0;\n        string t;\n        while(i<sz) {\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\') t.push_back(s[i]);\n            i++;\n        }\n        i=0;\n        int j=0;\n        sort(t.begin(), t.end());\n        while(i<sz)\n        {\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            {\n                s[i]=t[j++];\n            }\n            i++;\n        }\n        return s;\n        \n    }\n};\n```
['C++']