You are viewing a single comment's thread. Return to all comments →
def circularArrayRotation(a, k, queries):
n = len(a) b = [0]*n for i in range(n): b[(i+k)%n] = a[i] k = [] for i in queries: k.append(b[i]) return k
Seems like cookies are disabled on this browser, please enable them to open this website
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
Python 3
def circularArrayRotation(a, k, queries):