def rotate(self, nums, k):
while k > 0:
k -= 1
Really? this is pretty slow for insert at position 0. O(n)
This solution is not good and it is very slow due to insertion and deletion
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.