Example 1

Example 2

n == board.length == board[i].length2 <= n <= 20board[i][j] is either -1 or in the range [1, n2].The squares labeled 1 and n2 are not the starting points of any snake or ladder.Example 1

Example 2

n == board.length == board[i].length2 <= n <= 20board[i][j] is either -1 or in the range [1, n2].The squares labeled 1 and n2 are not the starting points of any snake or ladder.