Leetcode - Reverse String

My code:

public class Solution {
    public String reverseString(String s) {
        if (s == null || s.length() == 0) {
            return s;
        }
        
        StringBuilder sb = new StringBuilder(s);
        return sb.reverse().toString();
    }
}

煞笔题目,没什么好说的。

Anyway, Good luck, Richardo! -- 08/27/2016

你可能感兴趣的:(Leetcode - Reverse String)