@@ -0,0 +1,981 @@
+class Solution %7B%0A    public String reverseStr(String s, int k) %7B%0A        StringBuilder result = new StringBuilder();%0A        int length = s.length();%0A        int size = (int) Math.ceil((double) length/ (double) k);%0A        int next = 0;%0A        for (int i = 1; i %3C= size; i++) %7B%0A            String temp;%0A            int tempSize;%0A            if (i %25 2 == 0) %7B%0A                if (next + k %3E length) %7B%0A                    tempSize = length;%0A                %7D else %7B%0A                    tempSize = next + k;%0A                %7D%0A                temp = s.substring(next, tempSize);%0A            %7D else %7B%0A                if (next + k %3E length) %7B%0A                    tempSize = length;%0A                %7D else %7B%0A                    tempSize = next + k;%0A                %7D%0A                temp = new StringBuilder(s.substring(next, tempSize)).reverse().toString();%0A            %7D%0A            result.append(temp);%0A            next = next + k;%0A        %7D%0A        return result.toString();%0A    %7D%0A%7D%0A

Create ReverseStringII.java