You are viewing a single comment's thread. Return to all comments →
Python index slicing makes this trivial :D
def array_left_rotation(a, n, k): return a[k:] + a[:k]
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
Python index slicing makes this trivial :D