LeetCode – Reverse Vowels of a String (Java)
Write a function that takes a string as input and reverse only the vowels of a string. Java Solution this is a simple problem which can be solved by using two pointers scanning from beginning and end of the array. public String reverseVowels(String s) { ArrayList<Character> vowList = new ArrayList<Character>(); vowList.add(’a’); vowList.add(’e’); vowList.add(’i’); vowList.add(’o’); vowList.add(’u’); … Read more