📌✅ C++ || 100% Faster Solution || IMAGE EXPLANATION || using SUBSTRING
PLEASE UPVOTE if you like || If you have any Question, feel free to ask.\n\n Problem Understanding\nThe given string s can be of length divisible by 2k totally 
**PLEASE UPVOTE if you like || If you have any Question, feel free to ask.**\n\n* Problem Understanding\nThe given string **s** can be of *length* divisible by **2k** totally or with some remainder.\n\n* Generate remainder and handle it later, do reverse opterations of ***k*** length for each substring ; **if the subsring length is less than k reverse the substring totally**\n\n<img src ="https://assets.leetcode.com/users/images/e5338925-9bd5-43b6-a123-e268490a8a6b_1643410702.170178.jpeg" height= 700 width= 800>\n\n**C++ CODE**\n\n```\nclass Solution {\npublic:\n    string reverseStr(string s, int k) {\n        //find length of string s\n        int len = s.length();\n        //find extra remainders of string\n        int rem = len%(2*k);\n        \n        //trace out actual 2k divisible length of string\n        int actual = len-rem;\n        \n        //initialze values of the two pointer variables\n        int start = 0;\n        int end = 2*k;\n        string s2="";\n        while(actual){\n            //use substr function two get the substring from the s\n            string temp = s.substr(start, end );\n            //reverse the generated substring\n            reverse(temp.begin(),temp.begin()+k);\n            \n            //reinitalize the starting index for next substring\n            start = start + 2*k;\n            \n            //add to main string after the reverse operation on the substring\n            s2 = s2 + temp ;\n            //take off the subtring length on which we have already worked\n            actual = actual-(2*k);\n        }\n        \n        //handle the remainder subtring which was less than 2k length seperately \n        if(rem>0){\n            if(rem < k){\n                string temp = s.substr(len-rem , rem);\n                reverse(temp.begin(), temp.end());\n                s2 = s2 + temp;\n            }\n            else if(rem <= 2*k){\n                string temp = s.substr(len-rem , rem);\n                reverse(temp.begin(), temp.begin()+k);\n                s2 = s2 + temp;\n            }\n        }\n        return s2;\n    }\n    \n};\n```\n\n* **Use of SUBSTRING (substr()) C++**\n\n\n<img src="https://assets.leetcode.com/users/images/0913f5c9-e6dc-4b4b-a677-956832fc668f_1643410885.499699.jpeg" height = "700" width="800">\n\n\n\n\n\n\n\n\n\n \n
['String', 'C']