Skip to content

Instantly share code, notes, and snippets.

View KumaDun's full-sized avatar

KumaDun KumaDun

View GitHub Profile
class Solution:
def rotate(self, nums: List[int], k: int) -> None:
"""
Do not return anything, modify nums in place
"""
if k > len(nums):
k = k % len(nums)
for i in range(n-k, n):
curr_i = i
while True: