You are viewing a single comment's thread. Return to all comments →
def rotateLeft(d, arr):
return arr[d:] + arr[:d]
n_arr = [] m_arr = arr.copy() for i in range(len(arr)): if i <= d - 1: n_arr.append(arr[i]) m_arr.remove(arr[i]) return m_arr + n_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 →
def rotateLeft(d, arr):
def rotateLeft(d, arr):