-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Giving Wrong Solution #3
Comments
Yep, got me the wrong answer too. |
#Check Col
Here is this problem - it should be pos[0] != i instead of pos[1] |
I'm getting (sorry to post entire thing): IndexError Traceback (most recent call last) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in solve(bo) in valid(bo, num, pos) IndexError: list index out of range |
current code: #Check Col for i in range(0, len(bo)):
should be: #Check Col for i in range(0, len(bo)):
|
Hey Tim,
try this matrix for board in the solver (text) file. this is giving incorrect solution. you can verify correct answer if you wish from https://anysudokusolver.com/.
correct solution
![image](https://user-images.githubusercontent.com/32913413/71374671-8821b080-25e1-11ea-8282-25fd4bdd87af.png)
board = [
[1, 0, 0, 0, 4, 0, 0, 0, 0],
[0, 9, 2, 6, 0, 0, 3, 0, 0],
[3, 0, 0, 0, 0, 5, 1, 0, 0],
[0, 7, 0, 1, 0, 0, 0, 0, 4],
[0, 0, 4, 0, 5, 0, 6, 0, 0],
[2, 0, 0, 0, 0, 4, 0, 8, 0],
[0, 0, 9, 4, 0, 0, 0, 0, 1],
[0, 0, 8, 0, 0, 6, 5, 2, 0],
[0, 0, 0, 0, 1, 0, 0, 0, 6]
]
your code solution is :
![image](https://user-images.githubusercontent.com/32913413/71374716-b69f8b80-25e1-11ea-83e0-bb9e977aca69.png)
The text was updated successfully, but these errors were encountered: