Reverse String(#344)

编号名称等级
344Reverse StringEasy

思路

解题思路请看 #557 Reverse Words In a String III

代码

1
2
3
4
5
public class Solution {
    public String reverseString(String s) {
        return  new StringBuilder(s).reverse().toString();
    }
}