1st question : Why this backtracking problem is under linked list section?
2nd question: The same code is giving correct output under rat in a maze in backtracking problem.
3 testcases giving run time error
-
The question being under LinkedList section is probably by mistake. Linked lists have nothing to do with this question, so don’t worry about it.
-
In ‘Rat in a maze’ problem, you can only move ‘down’ or ‘right’ whereas in ‘Rat chases its cheese’ - ‘up’, ‘down’, ‘right’ and ‘left’ movements are allowed. You have only made two calls, hence the other test cases are causing errors.
If you have no further queries, please mark the doubt as resolved
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.