Sudoku Board Validator
Hard · Algorithms
A Sudoku board is valid (so far) when no digit 1-9 repeats in any row, any column, or any of the nine 3x3 boxes. Empty cells are "." and are ignored. The board does not need to be solvable.
The box of cell (r, c) can be numbered (r // 3, c // 3). One pass over all 81 cells is enough if you keep a set of "seen" entries per row, column and box.
Write is_valid_sudoku(board) where board is a list of 9 strings of 9 characters each. Return True or False.