✅Python3 33ms 🔥🔥 easiest solution
Intuition\n Describe your first thoughts on how to solve this problem. \nWith help of blocks of string we can solve this.\n\n# Approach\n Describe your approach
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nWith help of blocks of string we can solve this.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n- divide string in 2k blocks.\n- if length is less than k then reverse remainning and return.\n- now in 2k length blocks, get first k block of string.\n- reverse it and store.\n- now append rest of k symbols as it is.\n- do this till remainning length is greater than k.\n- now at end when length is less than k, reverse remanning and append them.\n- return from function.\n- return answer.\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(2N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def reverseStr(self, s: str, k: int) -> str:\n        ans = ""\n        def helper(org=s):\n            nonlocal ans\n            n = 2*k\n            if len(org)<k:\n                ans += org[::-1]\n                return\n            else:\n                while len(org) > k:\n                    t = org[0:n]\n                    org = org[n:]\n                    x = t[0:k]\n                    t = t[k:]\n                    ans += x[::-1] + t\n                if len(org) <=k:\n                    ans += org[::-1]\n            return\n        helper()\n        return ans\n```\n# Please like and comment below.\n# :-)
['String', 'Sliding Window', 'String Matching', 'Python3']