updated to matrix method to check validity

This commit is contained in:
Jacob Delgado 2023-08-22 23:30:34 -07:00
parent 790be3a565
commit a8cf9a4807

View File

@ -3,9 +3,13 @@ def isValidSudoku(board):
:type board: List[List[str]]
:rtype: bool
"""
x = []
y = []
for x in board:
temp = []
for x in range(len(board)):
for y in range(len(board[x])):
if y not in temp:
temp.append(board[x])
else:
return False
print(isValidSudoku([["5","3",".",".","7",".",".",".","."]