An grid represents the sequential path of a knight on a chessboard. The value at grid[row][col] represents the step order at which the cell (row, col) is visited, starting from step
A valid knight tour must satisfy the following conditions:
The knight must start at the top left cell (0, 0) at step
For every step from
Return true if grid represents a valid knight tour configuration, or false otherwise.
Constraints:
n grid.length grid[i].length
n
grid[row][col]
All integers in grid are unique.
An grid represents the sequential path of a knight on a chessboard. The value at grid[row][col] represents the step order at which the cell (row, col) is visited, starting from step
A valid knight tour must satisfy the following conditions:
The knight must start at the top left cell (0, 0) at step
For every step from
Return true if grid represents a valid knight tour configuration, or false otherwise.
Constraints:
n grid.length grid[i].length
n
grid[row][col]
All integers in grid are unique.