#=================================== # Tanzila Islam # Email: tanzilamohita@gmail.com # Language: Python 3 #=================================== class Solution: def rotate(self, nums: List[int], k: int) -> None: """ Do not return anything, modify nums in-place instead. """ for i in range(k): nums.insert(0, nums.pop())
No comments:
Post a Comment