the best and simplest solution ...

Programs which generate, solve, and analyze Sudoku puzzles

the best and simplest solution ...

Postby Guest » Fri May 27, 2005 11:15 pm

Data :
An array 9x9, each case is a list with all the number that are "possible".

initialisation :
* All the list get the 9 values from 1 to 9. (each number is possible)
* the case with already fixed values are a list of only 1 element (the value itself).

Work to do:
1) take each case already known (i.e. with only 1 value possible) and remove this value from the column, line and the 3x3 area.
2) For each case :
for each value possible for it :
if the value is unique in the column, the line OR the 3x3 area, then empty the list and set the value of the case.
3) If all case are solved ... STOP, else just go to steep 1.
Posts: 312
Joined: 25 November 2005

Return to Software