It is printing the same array
It is printing the original Sudoku array because you have printed it after calling the solver function , since you are using backtracking when you return you are reversing the array value to original one . print the array in base case for correct output