LeetCode 344. Reverse String

https://leetcode.com/problems/reverse-string/

纯属强迫症,写过的都想贴上来。

class Solution {
public:
    string reverseString(string s)
    {
       reverse(s.begin(),s.end());
        return s;
    }
};

 

posted @ 2016-12-04 21:34  Luke_Ye  阅读(91)  评论(0编辑  收藏  举报