You are viewing a single comment's thread. Return to all comments →
Looks a lot like my C# solution:
static int[] Rotate(int[] a, int n) { n %= a.Length; var ret = new int[a.Length]; for(int i = 0; i < a.Length; ++i) { ret[i] = a[(i + n) % a.Length]; } return ret; }
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 →
Looks a lot like my C# solution: