Write a function that takes a string as input and returns the string reversed.
Example:
Example:
Given s = "hello", return "olleh"
C++ string有反向迭代器rbegin,rend,利用反向迭代器可以实现反转字符串。
class Solution {
public:
string reverseString(string s) {
return string(s.rbegin(),s.rend());
}
};