C++ | Easy to understand | 2 lines
\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n      int n =s.size(),i=0;\n        while(i<n)\n        {\n            reverse(s.begin()+
```\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n      int n =s.size(),i=0;\n        while(i<n)\n        {\n            reverse(s.begin()+i,s.begin()+min(i+k,n));\n            i=i+2*k;\n        }\n        return s;\n    }\n};\n```
['C']