classSolution { public: voidreverseString(vector<char>&s) { intleft=0,right=s.size()-1; while(left<right){ swap(s[left],s[right]); ++left; --right; } } };
classSolution { public: voidreverseString(vector<char>&s) { intleft=0,right=s.size()-1; while(left<right){ swap(s[left],s[right]); ++left; --right; } } };