Codility: CyclicRotation

Time Complexity: O(N)
Space Complexity: O(1)

def solution(N):
def solution(A, K):
    idx = lambda k: (k - K) % len(A)
    return [A[idx(k)] for k, v in enumerate(A)]