541. Simple C++ solution
Code\n\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n        for(int i=0;i<s.size();i=i+k+k)\n        if(i+k<s.size())\n        reverse(
# Code\n```\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n        for(int i=0;i<s.size();i=i+k+k)\n        if(i+k<s.size())\n        reverse(s.begin()+i,s.begin()+i+k);\n        else if(i+k>=s.size())\n        reverse(s.begin()+i,s.end());    \n        return s;\n    }\n};\n```
['Two Pointers', 'String', 'C++']