Skip to content

A sudoku solver written in C++ that uses a backtracking algorithm and bit manipulation.

License

Notifications You must be signed in to change notification settings

vermotr/sudoku-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku solver

A sudoku solver written in C++ that uses a backtracking algorithm and bit manipulation.

How to use

make
cat puzzles/* | ./sudoku-solver

More information

This solver uses a backtracking algorithm but before starting the recursion, it finds the case with the least amount of branches. To do that, it stores each cell of the grid in an uint16_t. Each possible digit being represented by a bit.

i.e.:

2:          00000000 00000010
7:          00000000 01000000
3, 4 and 6: 00000000 00101100
0:          00000001 11111111

License

The MIT License (MIT) - see LICENSE for more details

About

A sudoku solver written in C++ that uses a backtracking algorithm and bit manipulation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published