#include "leetcode.h" class Solution { public: void reverseString(vector &s) { int i = 0, j = s.size() - 1; while (i <= j) { char tmp = s[i]; s[i] = s[j]; s[j] = tmp; i++; j--; } } };