You are viewing a single comment's thread. Return to all comments →
Great... Your formula worked for me in JS:
for (var i = 0; i < array.length; i++) { var newPos = (i + no_of_left_rotation) % array.length; newArray[i] = array[newPos]; }
Thanks a bunch mate :).
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 →
Great... Your formula worked for me in JS:
Thanks a bunch mate :).