mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update check_sudoku_board.py
This commit is contained in:
parent
e1e46e59c8
commit
3215e25e12
@ -3,7 +3,7 @@
|
|||||||
# author: bt3gl
|
# author: bt3gl
|
||||||
|
|
||||||
|
|
||||||
```
|
'''
|
||||||
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:
|
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:
|
||||||
|
|
||||||
- Each row must contain the digits 1-9 without repetition.
|
- Each row must contain the digits 1-9 without repetition.
|
||||||
@ -21,7 +21,7 @@ Input: board =
|
|||||||
,[".",".",".","4","1","9",".",".","5"]
|
,[".",".",".","4","1","9",".",".","5"]
|
||||||
,[".",".",".",".","8",".",".","7","9"]]
|
,[".",".",".",".","8",".",".","7","9"]]
|
||||||
Output: true
|
Output: true
|
||||||
```
|
'''
|
||||||
|
|
||||||
def is_valid_sudoku(board) -> bool:
|
def is_valid_sudoku(board) -> bool:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user