# Question

Formatted question description: https://leetcode.ca/all/345.html

 345	Reverse Vowels of a String

Write a function that takes a string as input and reverse only the vowels of a string.

Example 1:

Input: "hello"
Output: "holle"

Example 2:

Input: "leetcode"
Output: "leotcede"

Note:
The vowels does not include the letter "y".

@tag-string


# Algorithm

It should be noted that capital letters are counted, so there are ten letters in total.

We write a isVowel function to determine whether the current character is a vowel,

• If both sides are vowels, then we exchange,
• If the one on the left is not, move one place to the right,
• If the one on the right is not, move one place to the left

Java