✅ One Line Solution
Approach 1 - One Line\n\n# Complexity\n- Time complexity: O(n+v*log(v)), where n - all characters, v - vowels in the string.\n\n- Space complexity: O(n).\n\n# C
# Approach 1 - One Line\n\n# Complexity\n- Time complexity: $$O(n+v*log(v))$$, where n - all characters, v - vowels in the string.\n\n- Space complexity: $$O(n)$$.\n\n# Code\n```\nclass Solution:\n    def sortVowels(self, s: str) -> str:\n        return \'\'.join((q.popleft() if ch in \'AEIOUaeiou\' else ch) for ch, q in zip(s, [deque(sorted(ch for ch in s if ch in \'AEIOUaeiou\'))]*len(s)))\n```\n\n# Approach 2 - Counting Sort\n\n# Complexity\n- Time complexity: $$O(n)$$.\n\n- Space complexity: $$O(1)$$, result\'s space is not counted.\n\n# Code\n```\nclass Solution:\n    def sortVowels(self, s: str) -> str:\n        l = list(s)\n        vowelsCntr = dict(map(lambda x: (x, 0), \'AEIOUaeiou\'))\n        for ch in l:\n            if ch in vowelsCntr:\n                vowelsCntr[ch] += 1\n\n        it = iter(vowelsCntr)\n        curCh = next(it)\n        for i, ch in enumerate(l):\n            if ch in vowelsCntr:\n                while vowelsCntr[curCh] == 0:\n                    curCh = next(it)\n                l[i] = curCh\n                vowelsCntr[curCh] -= 1\n\n        return \'\'.join(l)\n```
['String', 'Sorting', 'Counting Sort', 'Python', 'Python3']