https://leetcode.com/problems/reverse-vowels-of-a-string/


Runtime: 1728 ms, faster than 5.01% of Python3 online submissions for Reverse Vowels of a String.

Memory Usage: 14.8 MB, less than 94.87% of Python3 online submissions for Reverse Vowels of a String.


```python
class Solution:
    def reverseVowels(self, s: str) -> str:
        #8:47
        vowels = ['a', 'e', 'i', 'o', 'u']
        vowels += [char.upper() for char in vowels]
        list_need_to_reverse = []
        
        for char in s:
            if char in vowels:
                list_need_to_reverse.append(char)
        list_need_to_reverse.reverse()
        
        newString = ""
        for char in s:
            if char in vowels:
                newString += list_need_to_reverse[0]
                list_need_to_reverse = list_need_to_reverse[1:]
            else:
                newString += char
        
        return newString
        #8:50
        #debug until 8:52
```

