You are viewing a single comment's thread. Return to all comments →
My solution in Python:
def rotateLeft(d, arr): shift_by = d % len(arr) result = [] result.extend(arr[shift_by:]) result.extend(arr[:shift_by]) return result
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: