Problem
Given a string s, reverse only the vowels and return the result. Every other character stays where it is. The vowels are a, e, i, o, u, in lowercase and uppercase.
Example 1
- Input
- s = "IceCreAm"
- Output
- "AceCreIm"
Example 2
- Input
- s = "leetcode"
- Output
- "leotcede"
Example 3
- Input
- s = "hello world"
- Output
- "hollo werld"
Constraints
1 <= s.length <= 3 * 10^5s consists of printable ASCII characters.