Funky Chess Board

What should be the base case in this problem? Is there any destination position, such that upon reaching at that destination, we backtrack?

yes, it will be

 if(i>n-1||j>n-1||i<0||j<0)
   {
      return;
   }

I did not find any video lecture for this particular problem. Help me with this.

I am unable to think ahead of this. I figured out all the possible squares that knight can visit. But how do i know the number of squares that the knight can not visit. Moreover how to minimize this number?
Help me understand what should be done further in the code, and why it should be done.

Here is the Code: https://ide.codingblocks.com/s/580093

There is a hint video name : $ Funky Chess Board Hint

You can make a function for that, and then can check for i,j position. Check this code


It will help you in understanding it well.

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.