Not able to pass test cases

hello @chirag.goel360
image
add one more condition in this if statement.

sol[i][j]==1 (this is done to avoid loop ie keep visting same state again n again in loop)