dfs that takes the current cell's coordinates (i, j) and the grid as parameters.false.(m - 1, n - 1), return true.dfs for the next cell.true, propagate this result back up the call stack.false.dfs from the starting cell (0, 0) and return its result.