Question: C programming - Sodoku Solution using Backtracking --------------------------------------------------- write a program that receives from the user sodoku board dimenstion(N) (can be any number for example:

C programming - Sodoku Solution using Backtracking

---------------------------------------------------

write a program that receives from the user sodoku board dimenstion(N) (can be any number for example: 3,4,5...) [not constant we must recieve it for the user]

and after that the sodoku board (we can fill elemnt a[i][j] with numbers from 1 to N and if it doesn't flled with a number then it is 0). [recieve from the user] after this the program must check if the board has solution then to print it, if not to print (NO solution!).

the rules: 1) to fill the board with numbers from 1 to N [we can assume that the user insert correct numbers no need to check it he inserts a number more than N] 2) two identical numbers must not appear on the same row

3) two identical numbers must not appear on the same colum

4) for this solution there is no limit for two identical numbers appearing in the same sub matrix(block) (for example: if it is 6x6 sodoku then number 1 for example can appear more than once in the sub matrix 3*3) [I provided an example]

5)the programm must be effective to finish in few seconds

6) must use backtracking *please run the program before giving me the solution. C programming - Sodoku Solution using Backtracking --------------------------------------------------- write a program thatreceives from the user sodoku board dimenstion(N) (can be any number forexample: 3,4,5...) [not constant we must recieve it for the user] andafter that the sodoku board (we can fill elemnt a[i][j] with numbersfrom 1 to N and if it doesn't flled with a number

input output 9 710000609 200003000 000150008 007000090 006000 700 020000400 1000 29000 000300004 905000086 712438 659 291763 845 36 4152978 457816392 5 8 6 941723 82 35 97461 148629537 679385214 935274186 No Solution! 9 710000619 200003000 000150008 007000090 006000700 020000400 1000 29000 000300004 905000086 in out 4 2000 0010 0123 0302 2431 3 214 4123 1342 in out 5 42000 20013 50120 00302 00000 42531 25413 53124 14352 31245 in out !No Solution 42005 20013 50120 00302 00000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!