I have done the same code as shown but my code is not working and terminates without printing anything. Pls check what is wrong
Why my code is not running
Hey @code_breaker-1001 Condition for your positive base case should be :
if(row == maze.length-1 && col == maze[0].length-1)
but you have written if(row == maze.length && col == maze[0].length)
So the overall basecase should be :
if(row == maze.length-1 && col == maze[0].length-1) {
System.out.println(ans);
return;
}
Ohhhk Thank you…
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.