The Knight's Tour

Given a board size (numRows, numCols) and a starting position (startRow, startCol), find an order in which a knight visits every cell of the board exactly once, starting from (startRow, startCol).

The knight moves in L-shape: 2 steps in one direction and 1 step perpendicular.

Return a numRows x numCols board where board[r][c] is the 0-based step index at which the knight visits cell (r, c). Inputs are generated such that at least one complete tour exists from the start cell. Any legal complete tour is accepted.

Examples
Input: [1,1,0,0]
Output: [[0]]
Hints

The Knight's Tour

Given a board size (numRows, numCols) and a starting position (startRow, startCol), find an order in which a knight visits every cell of the board exactly once, starting from (startRow, startCol).