How to solve this problem
Funky Chess Board Problem
@vivekpatel hey you have have to use recursion and backtracking and also take visited array for each index ,you will move in all directions and backtrack till you find the case where you can traverse maximum blocks. Also take care of current index whether they are in board limits or not,they should be within the board.
what will the base case
@vivekpatel hey in base you will take the board contraints ,suppose current index is out of board limits or current value of board index is 0 then you will return only.
if(i<0 || i>=10 || j<0 || j>=10 || board[i][j] == 0)
return;
I can’t understand how to solve this problem tell me how to solve this problem in steps
I think you have sent me different code
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.