## IBM coding question

Without Comments.

Usage : recur(arr, N, 0, 0)

```
void recur(int **arr, int N, int I, int J) {
if(N==0) return;
else if(N==1) { arr[I][J]=0; }
else {
int start = N*N, i=I, j=J;
for(; j < J+N ; j++) { arr[i][j] = (--start); }
for(i=i+1,j=j-1 ; i < I+N; i++) { arr[i][j] = (--start); }
for(j=j-1,i=i-1 ; j > J-1; j--) { arr[i][j] = (--start); }
for(i=i-1,j=j+1 ; i > I; i--) { arr[i][j] = (--start); }
recur(arr, N-2, I+1, J+1);
}
}
```

The below code will alternate. This is just something to start with.

- Mantis November 24, 2012