LeetCode 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:
Given s = “hello”, return “holle”.
Example 2:
Given s = “leetcode”, return “leotcede”.
Note:
The vowels does not include the letter “y”.
代码
C语言版本:
481 / 481 test cases passed.
Status: Accepted
Runtime: 4 ms