Skip to content

ebaratte/cpp-sudoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cpp-sudoku

A simple sudoku solver in C++. It uses a backtracking algorithm, that:

  • counts the possible values for each empty cell
  • if a cell has no possible value, the grid is not solvable; backtrack
  • fills each cell where only one value is possible with this value
  • tries each value for the remaining cell with the lowest count of possible values, recursively
  • if it could not solve the grid, backtrack.

Note: for a given empty cell, the algorithm computes possible values only by checking the row, the column and the 3x3 subsquare (ie. 'naked single') We could improve this by integrating other checks, eg. from http://www.su-doku.net/tech.php

About

Sudoku solver in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages