Skip to content

albert-gonzalez/sudoku-solver-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Solver in Golang

A little example of a sudoku solver in Go. I developed it to learn a little about this language.

Build & Usage

With docker installed, just run this command inside the project folder:

docker-compose up

Go will generate a binary called sugoku into the dist folder. Then, you can run this binary passing the path of the file with the sudoku to solve. For example:

dist/sugoku example.txt

The file must contain a sudoku in this format:

0 0 0 0 0 0 6 8 0
0 0 0 0 0 0 0 7 5
0 0 4 1 0 0 0 0 0
0 0 0 0 0 7 0 0 0
0 0 9 0 0 0 1 0 0
0 0 0 0 0 8 0 0 0
8 6 0 9 0 0 0 0 0
0 7 3 0 0 0 0 0 0
0 0 0 0 3 0 5 0 0

The 'zero' positions are the empty cells.

Tests

Run this command to run the tests:

docker-compose run --rm golang go test

About

Simple Sudoku Solver in Golang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages