You are viewing a single comment's thread. Return to all comments →
My solution in Python:
n,d = map(int, raw_input().strip().split()) arr = map(int, raw_input().strip().split())
print ' '.join(str(s) for s in (arr[d:] + arr[0:d]))
Left Rotation
You are viewing a single comment's thread. Return to all comments →
My solution in Python:
n,d = map(int, raw_input().strip().split()) arr = map(int, raw_input().strip().split())
print ' '.join(str(s) for s in (arr[d:] + arr[0:d]))