Skip to content
Solve a sudoku puzzle within 1 second.
Ruby Go Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
Gemfile
Gemfile.lock
README.md
puzzle0
puzzle2
sample
sudoku.mk2.rb
sudoku.mk3.rb
sudoku.py
sudoku.rb

README.md

1sec_sudoku

Solve a sudoku puzzle within 1 second.

Ruby Sample:

time ruby sudoku.mk3.rb puzzle2

Python:

time python2 sudoku.py puzzle2

Go:

go build src/sudoku.go
time ./sudoku puzzle2

The puzzle0 is very hard to backtrack. My Python solver tooks 6.5 minutes but the Go solver is much faster, around 28 seconds.

You can’t perform that action at this time.