how to take input in this rat in maze problem
Rat in a maze problem
taking input as a 2D array of characters(matrix of characters) would be a good idea.
then you just need 2 recursive calls , one to (i,j+1)path and another to (i+1,j) path to solve the problem.
Answer to your question is: 2D array of characters. read it using 2 loops and character reading function inside inner loop.
Thanks.
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.