Python short and clean. Functional programming.
Approach 1: Regular Sort\nTL;DR, Similar to Editorial solution Approach 1 but shorter and functional.\n\n# Complexity\n- Time complexity: O(n \cdot log_2(n))\n\
# Approach 1: Regular Sort\nTL;DR, Similar to [Editorial solution Approach 1](https://leetcode.com/problems/sort-vowels-in-a-string/editorial/?envType=daily-question&envId=2023-11-13) but shorter and functional.\n\n# Complexity\n- Time complexity: $$O(n \\cdot log_2(n))$$\n\n- Space complexity: $$O(n)$$\n\nwhere,\n`n is length of s`.\n\n# Code\n```python\nclass Solution:\n    def sortVowels(self, s: str) -> str:\n        is_vowel = tuple(x in \'AEIOUaeiou\' for x in s)\n        s_vowels = iter(sorted(compress(s, is_vowel)))\n        return \'\'.join(next(s_vowels) if v else x for x, v in zip(s, is_vowel))\n\n\n```\n\n---\n\n# Approach 2: Counting Sort.\nTL;DR, Similar to [Editorial solution Approach 2](https://leetcode.com/problems/sort-vowels-in-a-string/editorial/?envType=daily-question&envId=2023-11-13) but shorter and functional.\n\n# Complexity\n- Time complexity: $$O(n)$$\n\n- Space complexity: $$O(n)$$\n\nwhere,\n`n is length of s`.\n\n# Code\n```python\nclass Solution:\n    def sortVowels(self, s: str) -> str:\n        vowels = \'AEIOUaeiou\'\n        c = Counter(s)\n        s_vowels = chain.from_iterable(repeat(v, c[v]) for v in vowels)\n        return \'\'.join(next(s_vowels) if x in vowels else x for x in s)\n\n\n```
['String', 'Sorting', 'Python', 'Python3']