how to get only one solution maze, This code gives output of all possible solutions. Help
Rat in a maze backtracking
Plz maintain a visited[1001][1001] array, and before going downwards or right, plz check the similar condition
if(j+1<=M && !visited[i][j+1])
{
bool rightSuccess=ratmaze(maze,i,j+1,N,M);
if(rightSuccess==true)
{
return true;
}
}