The algorithm i hav in my mind is :
program will try to place a no. ,say 2 ,in any empty place in the grid.if it finds any violation,ie violation check functions returns true if they find another 2 in either row/column/box ..it moves to next emty place.
to check the violation..there should be three functions ,for checking error in row -column and box .
the numbers to be inserted, are asked by a recursive function where the base case is there are no emty place..but havn'e been able to construct this function
you may find readymade solution in net..but writting completely on your own
gives a great satisfaction !!!
This is a console-based Linux program, written in C language, that solves Su Doku puzzles (aka Sudoku, Number Place, etc., see figure 1) using deductive logic. It will only resort to trial-and-error and backtracking approaches upon exhausting its deductive moves.