Skip to content

faster sudoku solver #2658

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

Closed
wants to merge 1 commit into from
Closed

faster sudoku solver #2658

wants to merge 1 commit into from

Conversation

crypticsy
Copy link

@crypticsy crypticsy commented Oct 2, 2020

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@spamegg1
Copy link
Contributor

spamegg1 commented Oct 2, 2020

@crypticsy Good luck on your first PR here!

pre-commit will fail if there is no empty line at the end of the file.

Also you should provide proof that this solver is faster than sudoku.py by testing and timing it with Python's timeit module.

@crypticsy
Copy link
Author

@crypticsy Good luck on your first PR here!

pre-commit will fail if there is no empty line at the end of the file.

Also you should provide proof that this solver is faster than sudoku.py by testing and timing it with Python's timeit module.

Oh, thanks for the heads up @spamegg1. Also, I did time it, and kept the runtime inside a comment, if the merge gets denied, I will try to create a better submission that passes the guidelines completely.

@spamegg1
Copy link
Contributor

spamegg1 commented Oct 3, 2020

if the merge gets denied, I will try to create a better submission that passes the guidelines completely.

This probably won't get reviewed or merged until all checks pass.
First let's make sure to pass all the checks.
You can continue to add more commits to this submission.
You don't have to create another submission from scratch.
Add an empty line at the end of the file and commit/push again.
Then it will have a chance to get reviewed.

@crypticsy crypticsy closed this Oct 4, 2020
@crypticsy
Copy link
Author

@spamegg1 as you told me, I created a new pull request with an empty line at the end of the file and commit/push again. But the new one failed the pre-commit again.
I also tested and added the run time. The previous solution can take up to 1.37 seconds while mine usually takes 0,17seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants