board is a partly filled 9 × 9 Sudoku grid. Each cell holds a digit from "1" to "9", or "." when it is empty. Return true if the digits already placed break none of these rules, and false otherwise:
Only the filled cells are checked. Empty cells don't matter, and the board doesn't need to have a solution.
Every row, column and box holds each digit at most once.
This is Example 1 with a 4 added in the second row, eighth column. No other 4 shares its row or its column, but the top-right box already has a 4 in its first row.
This time a 1 is added in the top row, second column. The second column already has a 1, near the bottom.
Constraints
board.length == 9board[i].length == 9board[i][j] is a digit from "1" to "9", or ".".Each filled cell belongs to exactly one row, one column and one 3 × 3 box. The board is valid when no digit appears twice in any of those 27 groups.
true