Easy Python Solution
IntuitionThe problem requires sorting all the vowels in a string while leaving the consonants and their positions unchanged. My first thought was to extract all
# Intuition
The problem requires sorting all the vowels in a string while leaving the consonants and their positions unchanged. My first thought was to extract all vowels, sort them, and then reintegrate them into the original string while preserving the positions of the consonants.

# Approach
1. Define a helper function `isVowel` to check if a character is a vowel.
2. Extract all vowels from the input string `s` and store them in a temporary string `vow`.
3. Sort the vowels and store the result in `l_str`.
4. Iterate through the original string `s`:
   - If the character is a vowel, replace it with the next character from the sorted `l_str`.
   - Otherwise, keep the consonant unchanged.
5. Return the final string with the vowels sorted and consonants intact.

This approach ensures that only the vowels are sorted, while consonants remain in their original positions.

# Complexity
- **Time complexity:**  
  $$O(n + k \log k)$$  
  Extracting vowels requires $$O(n)$$ time, where $$n$$ is the length of the input string. Sorting the vowels takes $$O(k \log k)$$, where $$k$$ is the number of vowels in the string. The final iteration over the string requires $$O(n)$$ time. Hence, the total complexity is $$O(n + k \log k)$$.

- **Space complexity:**  
  $$O(k)$$  
  Additional space is used to store the extracted vowels in `vow` and the sorted vowels in `l_str`. 

# Code
```python
class Solution:
    def sortVowels(self, s: str) -> str:
        def isVowel(char):
            return char in "aeiouAEIOU"

        vow = ""
        for i in s:
            if isVowel(i):
                vow += i
        
        l_str = "".join(sorted(vow))
        res = ""
        l = 0
        for i in s:
            if isVowel(i):
                res += l_str[l]
                l += 1
            else:
                res += i
        return res

['Python3']