Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle".Example 2:Given s = "leetcode", return "leotcede".Note:The vowels does not include the letter "y".
Two Pointers 解法, 注意大小写
1 public class Solution { 2 public String reverseVowels(String s) { 3 StringBuffer res = new StringBuffer(s); 4 int l=0, r=s.length()-1; 5 while (l < r) { 6 while (l