Rat and its cheese 628


i am not getting anyoutput please tell where i a m mistaking

first you are setting solution[] to 0
and in function you first condition is
if(i>n||i>m||j>n||j>m||arr[i][j]==‘X’||solution[i][j]==0)
return ;
which is true
so it comes out of funciton without doing anything that why it is not giving any output
also see this code

i have resolved those but still not working


you have made one wrong condition
if(i>n||i>m||j>n||j>m||arr[i][j]==‘X’||solution[i][j]==1||i<1||j<1)
correct condition is
if(i>n||j>m||arr[i][j]==‘X’||solution[i][j]==1||i<1||j<1)

now it is working

still it is getting runtime error after printing output