Make function non-recursive
- by user69514
I'm not sure how to make this function non-recursive. Any ideas?:
void foo(int a, int b){
while( a < len && arr[a][b] != -1){
if(++a == len){
a = 0;
b++;
}
}
if( a == len){
size++;
return;
}
if( a < (len-1)){
arr[a][b] = 1;
…