2 test cases not passed
Hello @Pranav_Chaudhary,
You have misunderstood the question.
The question demands you to print only the first possible solution.
But, your code is printing all the possible successful paths that the rat can take.
Modification:
> boolean isDown=false;
if(!isRight) isDown = problem(maze, sol, i + 1, j, m, n);
Explanation:
if there is a path from right, then we won’t check for down.
Hope, this would help.
Give a like, if you are satisfied.