Reverse-String
第80天。
今天的题目是Reverse String:
Write a function that takes a string as input and returns the string reversed.
Example:
Given s = “hello”, return “olleh”.
水的不能再水的题目.
1 | string reverseString(string s) { |
如果用python
话:
1 | def reverseString(self, s): |