I got a homework to write a sudoku generator (in pascal), so I was wondering if you could help me with the algorithm. My first idea was to generate 9x9 grid of numbers that satisfies the sudoku rules and then erase numbers randomly and always test whether all the blank fields are determined. But I don't know how to test this quickly. So I would really appreciate some advice or link to a clever solution. I'm not looking for some advanced algorithm that incorporates human solving strategies etc. I just need a SIMPLE algorithm.
Thanks in advance for any suggestions
0 · ·