The shortest C++ solution


  • 0
    D
    class Solution {
    public:
        string reverseString( string s )
        {
            return string( s.rbegin( ), s.rend( ) );
        }
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.