easy way in java


  • 0
    R

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


Log in to reply
 

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