Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sudoku_solver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TheLostWanderer
sudoku_solver
Commits
e02bcee3
Commit
e02bcee3
authored
3 years ago
by
TheLostWanderer
Browse files
Options
Downloads
Patches
Plain Diff
update README
parent
d0582585
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+13
-3
13 additions, 3 deletions
README.md
with
13 additions
and
3 deletions
README.md
+
13
−
3
View file @
e02bcee3
# Sudoku Solver
# Sudoku Solver
This project aims at providing a Sudoku solver. The problem was given in the
This project aims at providing a Sudoku solver.
context of a technical assessment by a company.
## Problem
## Problem
...
@@ -32,4 +31,15 @@ listing a few methods to solve a classic Sudoku.
...
@@ -32,4 +31,15 @@ listing a few methods to solve a classic Sudoku.
The simplest approach is backtracking, which is a brute-force search, meaning,
The simplest approach is backtracking, which is a brute-force search, meaning,
we try all combinations of digits that fit until a rule is broken or until we
we try all combinations of digits that fit until a rule is broken or until we
reach the end of the puzzle. In the former case, we then try another value.
reach the end of the puzzle. In the former case, we then try another value.
If none is found, we update a previous digit. This is backtracking.
If none is found, we update a previous digit. This is backtracking.
## Selected Algorithm and Rational behind it
No performance requirement, in time or in space, were given. The same regarding
hardware requirement. Having this freedom, I went for the simplest approach to
solve this problem.
On my machine, equipped with an AMD Ryzen 5 3600 @4.2GHz, solving the first
problem takes between 12 and 13ms while, the problem 6, the large sudoku
takes less than 0.5ms to solve (the grid is bigger, but the problem is much
easier as the grid is almost full already).
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment