Java | PriorityQueue | 9 lines | Clean code
Complexity\n- Time complexity: O(n*log(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) \
# Complexity\n- Time complexity: $$O(n*log(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 {\n  public String sortVowels(String s) {\n    var str = s.toCharArray();\n    var pq = new PriorityQueue<Character>();\n\n    for (var c : str)\n      if ("AEIOUaeiou".indexOf(c) != -1)\n        pq.offer(c);\n\n    for (var i=0; i < str.length; i++)\n      if ("AEIOUaeiou".indexOf(str[i]) != -1)\n        str[i] = pq.poll();\n    \n    return new String(str);\n  }\n}\n```\nIf you like my solution, please upvote it!
['String', 'Heap (Priority Queue)', 'Java']