Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution {
- public:
- void reverseString(vector<char>& s) {
- int n = s.size();
- for(int i=0; i<n/2; i++){
- swap(s[i],s[n-1-i]);
- }
- return;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement