We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defrotLeft(a,d):# Write your code heren=len(a)nums=[]js=[]fori,numinenumerate(a):j=i-difj<0:j=n+jelse:j=jjs.append(j)nums.append(num)new_a=sorted(zip(js,nums))arr=[]foriteminnew_a:arr.append(item[1])returnarr
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →