mirror of
https://github.com/aykhans/leet-code-problems.git
synced 2025-04-17 04:03:12 +00:00
added is_valid_sudoku
This commit is contained in:
parent
05b677c7f5
commit
30ce7fdc37
@ -81,6 +81,10 @@ class AcceptedMedium:
|
||||
|
||||
def is_valid_sudoku(self, board: List[List[str]]) -> bool:
|
||||
# sourcery skip: list-comprehension, use-itertools-product
|
||||
"""
|
||||
Link: https://leetcode.com/problems/valid-sudoku/
|
||||
Runtime: 105 ms
|
||||
"""
|
||||
for i in board:
|
||||
r = [j for j in i if j != '.' ]
|
||||
if len(set(r)) < len(r): return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user