My Submission Using StringBuilder
```\nclass Solution {\n    public String reverseStr(String s, int k) {\n    \n        int p=k;\n        int j=0;\n        StringBuilder strb=new StringBuilder()
```\nclass Solution {\n    public String reverseStr(String s, int k) {\n    \n        int p=k;\n        int j=0;\n        StringBuilder strb=new StringBuilder();\n        StringBuilder str=new StringBuilder();\n        for(int i=0;i<s.length();i++)\n        {\n            if(p==0)\n            {\n                if(j!=1){\n                strb.reverse();\n                str.append(strb);\n                strb.setLength(0);\n                    j=1;\n                }\n                else{\n                j=0;\n                }\n                \n                 p=k;\n            }\n                if(j==0){\n                    strb.append(s.charAt(i)+"");\n                    p--;\n                    }\n                if(j==1){\n                    str.append(s.charAt(i)+"");\n                    p--;\n                }      \n        }\n        strb.reverse();\n        str.append(strb);\n        return str.toString();\n    }\n}
['String', 'Java']