Write a function that takes a string as input and returns the string reversed.
Example:
Given s = "hello", return "olleh"
思路:直接转StringBuffer后reserve即可;
JAVA CODE
class Solution { public String reverseString(String s) { StringBuffer ss = new StringBuffer(s); return ss.reverse().toString(); } }