Python solution
\nclass Solution(object):\n    def reverseStr(self, s, k):\n        """\n        :type s: str\n        :type k: int\n        :rtype: str\n        """\n        r
```\nclass Solution(object):\n    def reverseStr(self, s, k):\n        """\n        :type s: str\n        :type k: int\n        :rtype: str\n        """\n        res = \'\'\n        for i in xrange(0, len(s), k):\n            idx = min(i+k, len(s))\n            if (i/k) & 1 == 0:\n                res += s[i:idx][::-1]\n            else:\n                res += s[i:idx]\n\n        return res\n```
[]