Sudoku program made using C# backtracking
Initial value of sudoku
int[, ] board = {
{ 3, 0, 6, 5, 0, 8, 4, 0, 0 },
{ 5, 2, 0, 0, 0, 0, 0, 0, 0 },
{ 0, 8, 7, 0, 0, 0, 0, 3, 1 },
{ 0, 0, 3, 0, 1, 0, 0, 8, 0 },
{ 9, 0, 0, 8, 6, 3, 0, 0, 5 },
{ 0, 5, 0, 0, 9, 0, 6, 0, 0 },
{ 1, 3, 0, 0, 0, 0, 2, 5, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 7, 4 },
{ 0, 0, 5, 2, 0, 6, 3, 0, 0 }
};
Solution after 770 iterations:
-------------------
| 316 | 578 | 492 |
| 529 | 134 | 768 |
| 487 | 629 | 531 |
-------------------
| 263 | 415 | 987 |
| 974 | 863 | 125 |
| 851 | 792 | 643 |
-------------------
| 138 | 947 | 256 |
| 692 | 351 | 874 |
| 745 | 286 | 319 |
-------------------