@@ -0,0 +1,762 @@
+package com.yan.leetcode;%0A%0Aimport java.util.Arrays;%0A%0A/**%0A * Reverse String%0A *%0A * @author jingyangyan%0A * @version 1.0%0A * @create 2016-09-01 8:51%0A */%0Apublic class ReverseString %7B%0A    public String reverseString(String s) %7B%0A        StringBuilder sb = new StringBuilder();%0A        for (int i = s.length() - 1; i %3E= 0; i--) %7B%0A            sb.append(s.charAt(i));%0A        %7D%0A        return sb.toString();%0A    %7D%0A%0A    public String reverseString2(String s) %7B%0A        return new StringBuilder(s).reverse().toString();%0A    %7D%0A%0A    public String reverseString3(String s) %7B%0A        char%5B%5D array = s.toCharArray();%0A        String reverse = %22%22;  //%E6%B3%A8%E6%84%8F%E8%BF%99%E6%98%AF%E7%A9%BA%E4%B8%B2%EF%BC%8C%E4%B8%8D%E6%98%AFnull%0A        for (int i = array.length - 1; i %3E= 0; i--)%0A            reverse += array%5Bi%5D;%0A        return reverse;%0A    %7D%0A%7D%0A

reverse string