Code is giving right answer in dry run but unable to pass the test cases

There is some minor mistake that code is not printing desired output.Please correct it and tell me.Thank you


updated the code and added comments

i gort ur code but why my ispossible() function is not working.It seems correct

    if(j==n)
    {
        return false;
    }
    if(path[i][j]=='0'){
        return true;
    }
    else{
        return false;
    }

if(path[i][j]==‘0’){ this is not 0 this has to be capital ‘O’