What’s wrong with my code?
Below is the link to my code
Test case faiiling
Hey @mayanktyagi
You forgot to place the number
for(int number=1; number<=n; number++)
{
if(canPlace(a, i, j, n, number))
{
a[i][j]=number; //added this
bool solved = sudoku_solver(a, i, j+1, n);
if(solved)
{
return true;
}
}
}
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.