DisguisedEagle
New Coder
Python:
def solve_board(board):
for i in range(9):
for j in range(9):
if board[i][j] == '0':
for k in range(1, 10):
if not check_number(board, k, i, j):
board[i][j] = str(k)
if solve_board(board):
return True
else:
board[i][j] == '0'
return False
return True
I am making a sudoku solver, I saw this code but it doesn't seem to work for me. It fills my matrix only with one's. I can see the problem but I need help.