You are viewing a single comment's thread. Return to all comments →
JavaScript :
let l=arr.length; let rotate=d%l; while(r>0){ const val=arr.shift(); arr.push(val); rotate--; } return 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 →
JavaScript :