Sudoku Solver question

question–>

code–>


what is wrong with my code it is not chaging the 2d vector help i am passing it by reference only

Hey @sheikhhaji18

why it is called backtracking ,where are backtracking@Kartikkhariwal1 ?

it passed all testcases thanks @Kartikkhariwal1

You are first checking if u can place some number or not
if u can then u place it and go ahead with further recursion calls but it case it didnot work (reach to soln) in further recursions then u remove the placed number(this is backtracking) and try for some other number.

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.