Java only one line


  • 0

    only one line StringBuilder

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

Log in to reply
 

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