SUDOKU SOLVER problem

code: https://ide.codingblocks.com/s/160885
my code produces a correct output but the ans does not match the test case ans. possibly there are more than one correct answers but my test cases don’t pass.

Hello @itida_99,

Your Code is producing an incorrect output.
Example:
9
5 3 0 0 7 0 0 0 0
6 0 0 1 9 5 0 0 0
0 9 8 0 0 0 0 6 0
8 0 0 0 6 0 0 0 3
4 0 0 8 0 3 0 0 1
7 0 0 0 2 0 0 0 6
0 6 0 0 0 0 2 8 0
0 0 0 4 1 9 0 0 5
0 0 0 0 8 0 0 7 9
Output:
5 3 1 2 7 6 9 4 8
6 4 3 1 9 5 8 2 7
1 9 8 3 4 7 5 6 2
8 1 9 7 6 2 4 5 3
4 7 2 8 5 3 6 9 1
7 5 4 9 2 8 3 1 6
9 6 7 5 3 1 2 8 4
2 8 6 4 1 9 7 3 5
3 2 5 6 8 4 1 7 9

Observe the bold values.
Your solution contains the same element in the same block of sudoku and this not allowed.
Rules:

  1. Each block should contain 9 distinct values i.e. 1 to 9.
  2. an element should be placed in a cell if there is no matching element in the corresponding row and column,

Following above rules, you are required to solve the sudoku.

Suggestion:
Please watch the video: CPP - Recursion - Sudoku Solver of your course again.
There are many mistakes in your code.

Let me know if you still face any issue.
Hope, this would help.
Give a like if you are satisfied.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.