로딩
요청 처리 중입니다...

JAVA_Reverse Vowels of a String_LeetCode 345

 JAVA_Reverse Vowels of a String_LeetCode 345

JAVA_Reverse Vowels of a String_LeetCode 345 풀이 class Solution { public String reverseVowels(String s) { int x=0; int y=s.length()-1; List list=Arrays.asList('a','e','i','o','u','A','E','I','O','U'); char[] arr=s.toCharArray(); while(x
list.contains(arr[y])){ y--; } if(list.contains(arr[x]) && list.contains(arr[y])){ char temp=arr[x]; arr[x]=arr[y]; arr[y]=temp; x++; y--; } } return new String(arr); } } * 출처 Level up your coding skills and qu...

# JAVA # JAVA_LeetCode345 # JAVA_ReverseVowelsofaString # JAVA_ReverseVowelsofaString_LeetCode345 # ReverseVowelsofaString_LeetCode345