Python multiple solutions
List slicing\npython\nclass Solution:\n    def rotate(self, nums: List[int], k: int) -> None:\n        k = k % len(nums)\n        nums[:] = nums[-k:] + nums[:-k
# List slicing\n```python\nclass Solution:\n    def rotate(self, nums: List[int], k: int) -> None:\n        k = k % len(nums)\n        nums[:] = nums[-k:] + nums[:-k]\n```\n\n# Temp list of size k\n\n```python\nclass Solution:\n    def rotate(self, nums: List[int], k: int) -> None:\n        k = k % len(nums)\n        tmp = nums[-k:]\n        for idx in reversed(range(k, len(nums))):\n            nums[idx] = nums[idx-k]\n            \n        for idx, num in enumerate(tmp):\n            nums[idx] = num\n```\n\n# Cyclic Replacement\n\n```python\nclass Solution:\n    def rotate(self, nums: List[int], k: int) -> None:\n        k = k % len(nums)\n        count = 0\n        start = 0\n        while count < len(nums):\n            current = start\n            prev = nums[start]\n            while True:\n                next = (current + k) % len(nums)\n                temp = nums[next]\n                nums[next] = prev\n                prev = temp\n                current = next\n                count += 1\n                if current == start:\n                    break\n            start += 1\n```\n\n# List reversal\n\n```python\nclass Solution:\n    \n    def reverse(self, nums, start, end):\n        while (start < end):\n            nums[start], nums[end] = nums[end], nums[start]\n            start += 1\n            end -= 1\n            \n    def rotate(self, nums: List[int], k: int) -> None:\n        k = k % len(nums)\n        self.reverse(nums, 0, len(nums) - 1)\n        self.reverse(nums, 0, k - 1)\n        self.reverse(nums, k, len(nums) - 1)\n```
['Python', 'Python3']