I 'm getting run error in the test cases, can you please rectify it!
Your code was having few errors, I have modified your code a little bit, now it is producing the output,
one test case is failing now also.(no output).!
Maintain a visited array, check,
if(visited[i][j])
{
return false;
}
and before going downwards or right, check :
if(visited[i][j+1]==false && solution[i+1][j]==0)
{
downSuccess=ratmaze(maze,solution,i+1,j,N,M);
}
if(visited[i][j+1]==false && solution[i][j+1]==0)
{
rightSuccess=ratmaze(maze,solution,i,j+1,N,M);
}
my problem is not solved till now. can you please provide a reference code? . I have tried it with 2-3 methods
Plz send your code, which you have modified. I will make changes.
I have modified your code now, try to submit it
No , It is showing no path found for correct ans
Plz submit now, i have checked.