You may have heard of a puzzle where you must fill in squares for a 9x9 grid with the digits one through nine using the following rules. The digits can appear only once in each row and column. Furthermore, the 9x9 grid is divided into nine regions of 3x3 grids, and the digits can only appear once in each region. Given the following puzzle, write a recursive solution using backtracking that solves such a puzzle.
3 | 8 | 2 | ||||||
6 | 3 | 9 | ||||||
9 | 7 | 1 | 4 | |||||
9 | 2 | 5 | 4 | 3 | ||||
8 | 4 | 1 | ||||||
4 | 6 | 2 | 7 | 1 | ||||
1 | 6 | 3 | 9 | |||||
8 | 9 | 3 | 6 | |||||
3 | 6 | 7 |
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.