Verbose Java Solution, StringBuilder(s)
Tried to maximize usage of StringBuilder :)\n\npublic class Solution {\n    public String reverseStr(String s, int k) {\n        StringBuilder sb = new StringBu
Tried to maximize usage of ```StringBuilder``` :)\n```\npublic class Solution {\n    public String reverseStr(String s, int k) {\n        StringBuilder sb = new StringBuilder();\n        \n        int i = 0, j = 0;\n        while (i < s.length()) {\n            // first k\n            j = i + k <= s.length() ? i + k : s.length();\n            sb.append((new StringBuilder(s.substring(i, j))).reverse().toString());\n            \n            if (j >= s.length()) break;\n            \n            // second k\n            i = j;\n            j = i + k <= s.length() ? i + k : s.length();\n            sb.append(s.substring(i, j));\n            \n            i = j;\n        }\n        \n        return sb.toString();\n    }\n    \n}\n```
[]