Created
March 23, 2017 21:20
-
-
Save divmgl/91ec7dfc81850446192a4559f24af9ba to your computer and use it in GitHub Desktop.
Codility.com CyclicRotation 100%
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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