Funky Chess Board

wher am i gng wrong?

hello @dare_devil_007 as i have seen your code you are not backtracking in your code and when you are printing the final answer there you have to print the subtraction of places where we can go and places where the knight have went in our code .
let suppose 1 denotes the number of all possible moves in our grid and you will take one counter and you will increment it for all the number of ones in your grid .
and let k denotes the number of moves your knight have made within the possible blocks then your final answer should be total 1’s in the grid -k;
but you are simply printing the count .
if you have any other doubt please reply here we will discuss .
Happy Learning !!

No that is not what i am doing. What i did was if the cell is “1” i marking it as “2” so that this cell can be visited by the knight, then from there i am checking all the possible moves available and if that cell exist i am using recursion to do the same from there.Finally the grid will be filled with 2’s and 0’s and if there r any “1”'s still present, then we can say that that position cannot be visited.

hello @dare_devil_007 i have understood your approach but according to me you still need to backtrack .

can you please share your code??
//with comments

hello @dare_devil_007 yes sure .
here for your reference i am attaching the code https://ide.codingblocks.com/s/340649
if you feel your doubt is cleared please mark this doubt as resolved please mark as resolved .
Happy Learning !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.