from typing import List


class Solution:
    def rotate(self, nums: List[int], k: int) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        while k > 0:
            elem = nums.pop()
            nums.insert(0, elem)
            k -= 1
        return nums


sl1 = Solution()
sl2 = Solution()
print(sl1.rotate(nums=[1, 2, 3, 4, 5, 6, 7], k=3))
print(sl1.rotate(nums=[-1, -100, 3, 99], k=2))
