Last active
December 17, 2017 11:13
-
-
Save empeje/b7d387976221144a0ba4804934ef49bb to your computer and use it in GitHub Desktop.
[SNIPPET-18] Codility - Cyclic Rotation
This file contains 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
from collections import deque | |
# you can write to stdout for debugging purposes, e.g. | |
# print "this is a debug message" | |
def solution(A, K): | |
# write your code in Python 2.7 | |
d=deque(A) | |
d.rotate(K) | |
return list(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment