Rat in a maze doubt

https://ide.codingblocks.com/s/59091

if(findPath(maze,n,x,y+1,path)){
//path[x][y]=0;
return true;
}
the actual code contains the commented line:even if its removed…it still works fine

Siddhart I saw your code. You’ve seem to complicate the problem. You have put in a lot more than required operations and also it is given in question that rat can only move down or right which you have ignored in your solution code. I suggest read the question once again and try it from scratch. Remeber basic recursion has to be used and that recursion brings your answer to subproblems, you do not need to do anything extra, let the recursion solve your problem.