Simple java solution
\nclass Solution {\n    private void reverse(char[] arr,int i,int j){\n        while(i<j){\n            char temp=arr[i];\n            arr[i]=arr[j];\n         
```\nclass Solution {\n    private void reverse(char[] arr,int i,int j){\n        while(i<j){\n            char temp=arr[i];\n            arr[i]=arr[j];\n            arr[j]=temp;\n            i++;\n            j--;\n        }\n    }\n    public String reverseStr(String s, int k) {\n        char[] arr=s.toCharArray();\n        int n=arr.length,i=0;\n        while(i<n){\n                reverse(arr,i,Math.min(i+k-1,n-1));\n                i+=2*k;\n        }\n        return new String(arr);\n    }\n}\n```
['Java']