Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rotate(self, nums: List[int], k: int) -> None:
- for i in range(k):
- previous = nums[-1]
- for j in range(len(nums)):
- nums[j], previous = previous, nums[j]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement