class Solution {
public:
void reverseString(vector<char>& s) {
int size=s.size();
int i=0;
int j=size-1;
for(;i<=j;i++,j--){
char temp;
temp=s[i];
s[i]=s[j];
s[j]=temp;
}
}
};
一次通过