Brute force Algorithm for creation of Sudoku Board

前端 未结 6 1904
我寻月下人不归
我寻月下人不归 2021-02-09 12:59

What I am developing is that initially the entire sudoku board is empty. One of the random cells(out of 81) is filled with a random value(1-9).

Now I want to fill all

6条回答
  •  無奈伤痛
    2021-02-09 13:59

    Have a look at the following. Note that I have not run it, so I can't vouch for its claims:

    http://www.codeproject.com/KB/game/SudokuGen.aspx

    The code is in VB.NET, but the algorithm will be the same in C#.

    There is a C# version here:

    http://www.codeproject.com/KB/game/sudokuincsharp.aspx

    The link supplied by @Bill the Lizard does a nice job explaining things, as opposed to the implementation links I supplied above.

提交回复
热议问题