双指针,注意判断是否为元音的操作
bool IsVowel(char s){if(s=='a'||s=='e'||s=='i'||s=='o'||s=='u'||s=='A'||s=='E'||s=='I'||s=='O'||s=='U') return true;return false;
}char * reverseVowels(char * s){int len = strlen(s),i=0;while(i<len-1){if(IsVowel(s[i])&&IsVowel(s[len-1])){char temp = s[i];s[i] = s[len-1];s[len-1] = temp;i++,len--;}else if(IsVowel(s[i])) len--;else if(IsVowel(s[len-1])) i++;else len--,i++;}return s;
}