You are viewing a single comment's thread. Return to all comments →
I have written this using simple basics if you know best way to solve pls comment below : )
def rotateLeft(d, arr): dro=list(arr[i] for i in range(d)) for i in dro: arr.remove(i) x=arr+dro print(*x) if __name__ == '__main__': first_multiple_input = input().rstrip().split() n = int(first_multiple_input[0]) d = int(first_multiple_input[1]) arr = list(map(int, input().rstrip().split())) rotateLeft(d, arr)
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotate the Array
You are viewing a single comment's thread. Return to all comments →
I have written this using simple basics if you know best way to solve pls comment below : )