Shouldn’t the backtracking step be done inside the for loop. In the video tutorial its shown outside the loop for Sudoku solver. Since if we could sove the next problem we return true else we backtrack?
Backtracking Issue
In a function, you have particular i,j
For them you try diff values using for loop and backtrack in the last if required.
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.