标签:str rev tor mic ++ nbsp tco image while
1 class Solution { 2 public: 3 void reverseString(vector<char>& s) { 4 int i = 0, j = s.size()-1; 5 while(i < j) { 6 swap(s[i], s[j]); 7 ++i; 8 --j; 9 } 10 } 11 };
标签:str rev tor mic ++ nbsp tco image while
原文地址:https://www.cnblogs.com/FengZeng666/p/14492300.html