C# Solution


  • 0
    J

    public class Solution {
    public string ReverseString(string s) {

    char[] str = new char[s.Length];
    
    for (int i = str.Length - 1; i >= 0; i--)
    {
        str[str.Length - 1 - i] = s[i];
    }
    
    string result=new string(str);
        
    return result;
                
    }
    

    }


Log in to reply
 

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