c++
```\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n        for(int i=0;i<s.size();i+=k){\n            reverse(s.begin()+i,min(s.begin()+i
```\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n        for(int i=0;i<s.size();i+=k){\n            reverse(s.begin()+i,min(s.begin()+i+k,s.end()));\n            i+=k;\n        }\n        return s;\n    }\n};
['C']