Reverse vowels only

Write codeEasy12 min

Your task

Given a lowercase string s, reverse the order of its vowels (a, e, i, o, u) while every other character stays exactly where it is, and return the resulting string. Use one pointer scanning from each end: skip non-vowels, swap when both pointers rest on vowels. Example: 'hello' becomes 'holle', and 'audio' becomes 'oidua'.

Examples

reverse_vowels(s: str) -> str
Example 1
Inputreverse_vowels("hello")
Output"holle"