I was trying a Backtracking problem (SudokuSolver) I am getting an error which no-one could resolve or even understand. Hence I am seeking help here. The problem is as follows:
And the main function/part of my code is:
Here my removerow, removecol and removebox functions are removing the numbers which have already occurred in that row, column and sub-box of 3x3 respectively. The error I am getting is very long that is:
Can someone please help me with this? I'm stuck at it since 2 days. Ready to provide further clarification if needed. Please find the entire code here:
NB: To be able to run the test class against your code, you need to change it like this:
if __name__ == '__main__':
board = [[ int(ele) for ele in input().split() ] for i in range(9)]
ans=solveSudoku(board,0,0)
if ans:
print('true')
else:
print('false')