Python | Two-Pointers solution
```\nclass Solution:\n    def rotate(self, nums: List[int], k: int) -> None:\n        """\n        Do not return anything, modify nums in-place instead.\n      
```\nclass Solution:\n    def rotate(self, nums: List[int], k: int) -> None:\n        """\n        Do not return anything, modify nums in-place instead.\n        """\n            \n        def twopt(arr, i, j):\n            while (i < j):\n                arr[i], arr[j] = arr[j], arr[i]\n                i += 1\n                j -= 1\n            return arr\n        \n        if k > len(nums):\n            k %= len(nums)\n            \n        if (k > 0):\n            twopt(nums, 0, len(nums) - 1)  # rotate entire array\n            twopt(nums, 0, k - 1)          # rotate array upto k elements\n            twopt(nums, k, len(nums) - 1)  # rotate array from k to end of array
['Two Pointers', 'Python', 'Python3']