Question: Sudoku is a logic - based, combinatorial number placement puzzle. The objective is to fill a 9 x 9 grid with digits so that each
Sudoku is a logicbased, combinatorial number placement puzzle. The objective
is to fill a x grid with digits so that each column, each row, and each of
the nine x subgrids that compose the grid also called boxesblocks
regions or subsquares contains all of the digits from to The puzzle
setter provides a partially completed grid, which for a wellposed puzzle has a
unique solution
Requirements
Write a C program that reads a bunch of sudoku puzzles from standard in
put and solves them. Each puzzle is given as a line of characters, with
characters representing unknown digits.
If a solution exists that uses the given digits in the given order, find it and
print it Specifically, echo the input on one line and print the solution on
a new line.
If not, echo the input and print No Solution on a new line.
If the input does not follow the specified format, print Error on a new
line.
After each test case, output a blank line to standard output. So each line
of input will produce lines of output: echo of input, output line, and
blank line.
Whether or not the test was a valid sudoku puzzle, your program must
be prepared to handle the next test. Make sure that you do not leave
your program in an invalid state as the result of an error test case. This
is a particularly common issue when dealing with lines that were not of
the expected length. Make sure you reset all relevant bookkeeping before
beginning the next line of input.
Thank you, Wikipedia.
Input Format
A record is a sequence of characters followed by the newline character:
The input will consist of some number of records lines
Each valid record will consist of characters, representing the rows of
a sudoku puzzle, each consisting of characters.
The only valid characters in a record are the nine possible digits and
A valid record does not have the same number appear twice in the same
row, column, or box
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
