344. 反转字符串
class Solution {
public:
void reverseString(vector<char>& s) {
int head = 0, tail = s.size() -1;
while(head < tail){
char temp = s[head];
s[head] = s[tail];
s[tail] = temp;
++head;
--tail;
}
}
};