Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh".
实现:
class Solution {
public:
string reverseString(string s) {
int len = s.length();
for (int i = 0; i < len/2; i++) {
char c = s[i];
s[i] = s[len -1 - i];
s[len-1-i] = c;
}
return s;
}
};