左右双指针即可
void reverseString(vector<char>& s) {
for (int left = 0, right = s.size() - 1; left < right; ++left, --right)
swap(s[left++], s[right--]);
}
左右双指针即可
void reverseString(vector<char>& s) {
for (int left = 0, right = s.size() - 1; left < right; ++left, --right)
swap(s[left++], s[right--]);
}