class Solution {
public:
void reverseString(vector<char>& s) {
if (s.size() == 1) {
return;
}
for (int i = 0; i <= (s.size() - 2) / 2; ++i) {
swap(s[s.size() - 1 - i], s[i]);
}
}
};
class Solution {
public:
void reverseString(vector<char>& s) {
if (s.size() == 1) {
return;
}
for (int i = 0; i <= (s.size() - 2) / 2; ++i) {
swap(s[s.size() - 1 - i], s[i]);
}
}
};