simple  C++ 2 pointer approch -->find 2 pointer range
class Solution {\n    int min(int a,int b)\n    {\n        if(a>b)\n            return b;\n        else\n            return a;\n    }\n    void reverse(int i,in
class Solution {\n    int min(int a,int b)\n    {\n        if(a>b)\n            return b;\n        else\n            return a;\n    }\n    void reverse(int i,int j,string &s)\n    {\n        int d=abs(i-j);\n        if(d==1)\n        {\n            swap(s[i],s[j]);\n            return;\n        }\n        else\n        {\n            while(j>i)\n            {\n                swap(s[i],s[j]);\n                i++;\n                j--;\n            }\n            return;\n        }\n    }\npublic:\n    string reverseStr(string s, int k) \n    {\n        //if(k>s.length())\n           // return s;\n        int i=0;\n        while(i<s.length())\n        {\n            reverse(i,min(i+k-1,s.length()-1),s);\n            i=i+2*k;\n        }\n        return s;\n    }\n};
[]