题目链接 题目: 344. Reverse String Description Hints Submissions Discuss Solution Discuss Pick One 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) { reverse(s.begin(),s.end()); return s; } };