Skip to content

Instantly share code, notes, and snippets.

@divmgl
Created March 23, 2017 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divmgl/91ec7dfc81850446192a4559f24af9ba to your computer and use it in GitHub Desktop.
Save divmgl/91ec7dfc81850446192a4559f24af9ba to your computer and use it in GitHub Desktop.
Codility.com CyclicRotation 100%
def solution(A, K):
if len(A) == 0:
return A
for _ in range(K):
A.insert(0, A.pop())
return A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment