Question: C++ Project -- Sudoku Solver Project 2- Sudoku Solver Due date: Friday, March 2, 2018 Develop and Implement a stack-based Sudoku puzzle solver. Detals You

C++ Project -- Sudoku Solver

C++ Project -- Sudoku Solver Project 2- Sudoku Solver Due date: Friday,

March 2, 2018 Develop and Implement a stack-based Sudoku puzzle solver. Detals

You are most likely famillar with the Sudoku puzzle game. It consists

of a 9-by-9 grld; Initially, some of the positions are filled with

numbers and others are blank. When solved, each row must have all

Project 2- Sudoku Solver Due date: Friday, March 2, 2018 Develop and Implement a stack-based Sudoku puzzle solver. Detals You are most likely famillar with the Sudoku puzzle game. It consists of a 9-by-9 grld; Initially, some of the positions are filled with numbers and others are blank. When solved, each row must have all of the Integers 1 -9. each column must have all of the Integers 1-9 and each of the nine 3-by-3 blocks must have all of the Integers 1-9 One method to solve a Sudoku puzzle is trlatand-error. If a valld guess can be made, make it and repeat. If no valld guess can be made, go back to the prevlous guess and change It; If no other guesses can be made. go back to the guess before that. Continue until elther all boxes are filled or all guesses are exhausted (which shouldn't happen because that means there is no solution.) Create a stack of Integers whlch represent the location of cells belng filled In. The top location on the stack represents the cell currently belng filled In. Note that there will be at most 64 locations to track, since any Sudoku puzzle must have at least 17 cells filled In Initially Note: If you're clever. you only need one Integer to represent the location, not two. Read the data from cin. Input consists of nlne lines of nine characters- lf a cell Is filled in, its character will be a digit 1-9. If It Is blank, Its character ls a period. Pro tip: You only need a single char varlable for the Input: no strings necessary. Once the data is read, use the following algorithm to sove the puzzle

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!