1-liner, 99% faster, 70% less mem
Approach\n1. extract all vowels into list x\n2. sort them and get iterator so we can easily get next\n3. liner acan s, if it is a vowel, replace with next\n\n# 
# Approach\n1. extract all vowels into list `x`\n2. sort them and get iterator so we can easily get next\n3. liner acan s, if it is a vowel, replace with next\n\n# Complexity\n- Time complexity: $$O(n+VlogV)$$ where $$V$$ is number of vowels in `s`\n\n- Space complexity: $$O(n)$$\n\nIf you like it, please up-vote. Thank you!\n \n# Code\n```\nclass Solution:\n    def sortVowels(self, s: str, v="aeiouAEIOU") -> str:\n        return (x:=iter(sorted([c for c in s if c in v])))and "".join([next(x)if c in v else c for c in s])\n\n```
['Python3']