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]))
Seems like cookies are disabled on this browser, please enable them to open this website
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]))