@@ -0,0 +1,1080 @@
+public class Solution %7B%0A    public String reverseVowels(String s) %7B%0A        if(s== null %7C%7C s.length()%3C=1)%7B%0A            return s;%0A        %7D%0A        int left = 0;%0A        int right = s.length()-1;%0A        Set%3CCharacter%3E vowel = new HashSet%3C%3E();%0A        char%5B%5Dvowels = %7B'a','e','i','o','u'%7D;%0A        for(char c:vowels)%7B%0A            vowel.add(c);%0A            vowel.add(Character.toUpperCase(c));%0A        %7D%0A%0A        %0A        char%5B%5D str = s.toCharArray();%0A        while(left%3Cright)%7B%0A            char l = str%5Bleft%5D;%0A            char r = str%5Bright%5D;%0A            if(vowel.contains(l) && vowel.contains(r))%7B%0A                swap(str,left,right);%0A                left++;%0A                right--;%0A            %7Delse if(vowel.contains(l))%7B%0A                right--;%0A            %7Delse if(vowel.contains(r))%7B%0A                left++;%0A            %7Delse%7B%0A                left++;%0A                right--;%0A            %7D%0A        %7D%0A        return String.valueOf(str);%0A    %7D%0A    private void swap(char%5B%5D str, int i, int j)%7B%0A        char tmp = str%5Bi%5D;%0A        str%5Bi%5D = str%5Bj%5D;%0A        str%5Bj%5D = tmp;%0A    %7D%0A%7D

The solution for 345. Easy