Please explain why do we but backtrack statement inside for loop in n-queen problem whereas in sudoku problem we place backtrack statement after for loop
Placing of backtrack statement
@pragyachoudhary1111 both are different problems. In n queen you have to place only 1 queen in each row so you dont have to check for further columns if you can place it correctly once. But in sudoku, you have to place for further columns as well.
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.