344 reverse string
cpp
class Solution {
public:
string reverseString(string s) {
reverse(s.begin(),s.end());
return s;
}
};
python
class Solution(object):
def reverseString(self, s):
"""
:type s: str
:rtype: str
"""
return s[::-1]