Reverse Vowels of a String
Leetcode problem 345; Difficulty: Easy
Problem Statement
Given a string s, reverse only all the vowels in the string and return it.
The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both cases.
Constraints:
1 <= s.length <= 3 * 105sconsist of printable ASCII characters.
Example 1:
Input: s = "hello"
Output: "holle"
Example 2:
Input: s = "leetcode"
Output: "leotcede"
Submitted Solution
The first solution received the following rating on Leetcode:

By making a simple and small improvement to the implementation of the IsVowel convenience method in the second solution, the Leetcode rating improved to:
