do we need to count cells for one pass only or is it to find all cells that cannot be reached even if the knight makes all moves possible?
Related to the problem
@pradhumangupta99
you have to find cells which are not reachable after knight makes all the possible moves.
can “not reachable” cells include the cells which were marked 0 in the input?
@pradhumangupta99
In this question, the cells which are marked as 1 are the part of board and which are marked as 0 are outside the board(as we know the board is not nxn, every row can be different).
So you will just start the (0,0) point and then will try every possible move and atlast return the count of points which are not reachable by any of the move. (so for that apply recursion for every possible transition from the current point and take the answer for the that recursive case in which the number of visited points are maximum).
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.