Easy to understand
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```javascript []\n/**\n * @param {string} s\n * @return {string}\n */\nvar sortVowels = function(s) {\n    let hash = new Map([[\'A\', 1],[\'E\', 1],[\'I\', 1],[\'O\', 1],[\'U\', 1],[\'a\', 1],[\'e\', 1],[\'i\', 1],[\'o\', 1],[\'u\', 1]]);\n    idsave = [];\n    vowsave = [];\n    for(let i=0; i<s.length; i++) {\n        if(hash.has(s[i])) {\n            idsave.push(i);\n            vowsave.push(s[i]);\n        }\n    }\n    vowsave.sort();\n    let res = s.split(\'\');\n    for(let i=0; i<idsave.length; i++) {\n        res[idsave[i]] = vowsave[i];\n    }\n    res = res.join(\'\');\n    return res;\n};\n```\n```cpp []\nclass Solution {\npublic:\n    string sortVowels(string s) {\n        unordered_map<char, int> hash;\n        hash.insert({\'A\', 1});\n        hash.insert({\'E\', 1});\n        hash.insert({\'I\', 1});\n        hash.insert({\'O\', 1});\n        hash.insert({\'U\', 1});\n        hash.insert({\'a\', 1});\n        hash.insert({\'e\', 1});\n        hash.insert({\'i\', 1});\n        hash.insert({\'o\', 1});\n        hash.insert({\'u\', 1});\n        vector<int> idsave;\n        vector<char> vowsave;\n        for(int i=0; i<s.size(); i++) {\n            if(hash.find(s[i])!=hash.end()) {\n                idsave.push_back(i);\n                vowsave.push_back(s[i]);\n            }\n        }\n        sort(vowsave.begin(), vowsave.end());\n        for(int i=0; i<idsave.size(); i++) {\n            s[idsave[i]] = vowsave[i];\n        }\n        return s;\n    }\n};\n```\n
['C++', 'JavaScript']