You are viewing a single comment's thread. Return to all comments →
My solution in Python 3:
def rotateLeft(d, arr): n = len(arr) new_arr = [] for idx in range(n): new_arr.append(arr[(idx + d) % n]) return new_arr
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 3: