sudokoSolver no output

https://online.codingblocks.com/player/6576/content/4919?s=1441
https://ide.codingblocks.com/s/63812

Hi Aniket, that is because you had missed a condition in the sudokoSolver function. This is the condition that you need to add:

if(board[r][c]!=0){
return sudokoSolver(board,n,r,c+1);
}

I’ve added that condition and now the code works fine. You can refer to it here:
https://ide.codingblocks.com/s/64537

1 Like