You are viewing a single comment's thread. Return to all comments →
`what about this?
static int[] rotLeft(int[] a, int d) {
int[] temp = new int[a.Length]; int hg = 0; for (int i = d; i < (a.Length+d);i++) { temp[hg] = a[i%a.Length]; hg++; } return temp;`
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 →
`what about this?
static int[] rotLeft(int[] a, int d) {