problem
solution:
class Solution {public: void reverseString(vector& s) { vector temp(s.size(), '0'); for(int i=s.size()-1; i>=0; i--) { temp[i] = s[s.size()-i-1]; } for(int i=0; i
solution2:
class Solution {public: void reverseString(vector& s) { int left = 0, right = s.size()-1; while(left
参考
1. ;
完