i am not able to find the bug.
I am getting wrong answer in funky chess board
Hello @S19APP-PP0086,
There are few issues with your code:
while(j<10){
v[i][j]=-1;
j++;
}
This loop in main function will execute only once as for first iteration of outter loop i.e. i, it will become 10 and will remain 10 for all other values of i.
Why are you passing maxr and maxc as 3:
numberofvisited(v,0,0,3,3,1);
Please refer to my code:
I am sharing it so that you can compare which boundary cases are you missing in your code.
Just view it as a reference.
Do the necessary modification in your code and if still not works, share that code with me.
Hope, this would help.
Give a like, if you are satisfied.
2 Likes