simple method
Intuition\n Describe your first thoughts on how to solve this problem. \nself intutition\n\n# Approach\n Describe your approach to solving the problem. \ntwo po
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nself intutition\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\ntwo pointers \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ --> O(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ --> O(1)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    string reverseStr(string s, int k) \n    {\n    int st,ed,i,n=s.size();\n    if(n<k)\n    {\n    reverse(s.begin(),s.end());\n    return s;\n    }\n    for(i=0;i<s.size();i=i+2*k)\n    {\n    st=i;\n    ed=i+(k-1);\n    if(ed>n-1) // to handle one test case \n    ed=n-1;\n    while(st<ed)\n    {\n        swap(s[st],s[ed]);\n        st++,ed--;\n    } \n    }\n    return s;\n    }\n};\n```
['C++']