[演算法笔记]反轉字串 void reverse(char* s) { int n = strlen(s); for (int i=0; i<n/2; i++) swap(s[i], s[n-1-i]); }