Skip to content

Julian-Wollersberger/sudoku_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Solver

Have you ever wanted to solve a sudoku, but were to lazy to do so? No problem! I have the solution you need!

Step 1: Enter the sudoku as CSV

_,5,_,9,_,_,3,7,_
1,8,9,_,4,_,_,6,5
3,_,_,_,_,_,_,4,_
_,_,_,_,3,_,_,_,6
_,9,_,6,8,5,_,2,_
5,_,_,_,9,_,_,_,_
_,4,_,_,_,_,_,_,1
9,3,_,_,6,_,7,8,4
_,1,8,_,_,3,_,5,_

Step 2: Pretty-Printing Magic

$ cargo run

+-----+-----+-----+
|  5  |9    |3 7  |
|1 8 9|  4  |  6 5|
|3    |     |  4  |
+-----+-----+-----+
|     |  3  |    6|
|  9  |6 8 5|  2  |
|5    |  9  |     |
+-----+-----+-----+
|  4  |     |    1|
|9 3  |  6  |7 8 4|
|  1 8|    3|  5  |
+-----+-----+-----+

Step 3: Apply Algorithms

Solved 48 cells.

+-----+-----+-----+
|4 5 2|9 1 6|3 7 8|
|1 8 9|3 4 7|2 6 5|
|3 7 6|5 2 8|1 4 9|
+-----+-----+-----+
|8 2 4|7 3 1|5 9 6|
|7 9 1|6 8 5|4 2 3|
|5 6 3|2 9 4|8 1 7|
+-----+-----+-----+
|2 4 7|8 5 9|6 3 1|
|9 3 5|1 6 2|7 8 4|
|6 1 8|4 7 3|9 5 2|
+-----+-----+-----+

(xkcd.com/1831)

Step 4: ???

+-----+-----+-----+
|? ? ?|? ? ?|? ? ?|
|? ? ?|? ? ?|? ? ?|
|? ? ?|? ? ?|? ? ?|
+-----+-----+-----+
|? ? ?|? ? ?|? ? ?|
|? ? ?|? ? ?|? ? ?|
|? ? ?|? ? ?|? ? ?|
+-----+-----+-----+
|? ? ?|? ? ?|? ? ?|
|? ? ?|? ? ?|? ? ?|
|? ? ?|? ? ?|? ? ?|
+-----+-----+-----+

Step 5: Profit!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages