You are viewing a single comment's thread. Return to all comments →
function rotateLeft(d, arr) { let arrSlice = arr.slice(0, d); let rotateArr = arr.slice(d) let finalArr = [...rotateArr, ...arrSlice]; return finalArr; }
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 →
Here's a solution in Javascript