Java One Line Solution


  • 0
    W

    public class Solution {
    public String reverseString(String s) {
    return new StringBuffer(s).reverse().toString();
    }
    }


Log in to reply
 

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