Question: How to solve sudoku 4x4 grid recursively using backtracking algorithm in C++. And show number of how many solutions to play a randomly given 4x4
How to solve sudoku 4x4 grid recursively using backtracking algorithm in C++. And show number of how many solutions to play a randomly given 4x4 sudoku grid.
for example :
this 4x4 grid :
| 0 | 1 | 0 | 0 | | 0 | 2 | 0 | 0 | | 0 | 0 | 3 | 0 | | 0 | 0 | 0 | 4 |
will have 2 solutions : | 3 | 1 | 4 | 2 | | 4 | 2 | 1 | 3 | | 2 | 4 | 3 | 1 | | 1 | 3 | 2 | 4 |
| 4 | 1 | 2 | 3 | | 3 | 2 | 4 | 1 | | 1 | 4 | 3 | 2 | | 2 | 3 | 1 | 4 |
Display all the solutions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
