last modified on Sun, 31 Jul 2022
Given an \(M \times N\) integer array grid where grid[i][j] could be:
grid
grid[i][j]
1
2
0
-1
Return the number of 4-directional walks from the starting square to the ending square, that walk over every non-obstacle square exactly once.