Suppose that the destination cell is blocked, solution should return false. But your answer returns true because before checking whether it is valid to enter this cell, we check whether is is actually destination. That needs to change, I think.
Error on the edge cases
Yes that’s right. Before moving on to any cell, first we should check if it is blocked or not.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.