C# simple one line solution:


  • 0
    A
    public class Solution {
        public string ReverseString(string s) {
            string output = new string(s.ToCharArray().Reverse().ToArray());
            return output;
        }
    }
    

Log in to reply
 

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