Changes

Jump to: navigation, search

Algo holics

106 bytes added, 03:54, 22 February 2019
Assignment 1
<h6h5>Sudoku Solver</h6h5>
Is it a program that solves Sudoku puzzles(9X9) using Bruteforce algorithm. Either the user can pass a Sudoku files as an input or enter the values manually. Moreover, the file or the manual entry should have strictly 9 rows and 9 columns in them. Lastly, all the cells should be separated by a space and the cells that needs to be solved should have 0 in them as their value.
In this program the Bruteforce algorithm first put 1 in the first cell and then check if it is violating any rules. If yes, then it increment the value to 2 and check again (The value can vary from 1-9) until it finds the appropriate value. After finding a suitable value for the first cell, it moves to the second cell and put 1 in there and again check again if it violating any rules. If it is discovers that 1 is not allowed in that cell, then the algorithm will increment it to 2 and check again.
 
<h5>Compiling the program</h5>
`g++ -std=c++0x -pg solver.cpp checks.cpp checksolution.cpp -o Sudoku`
=== Assignment 2 ===
=== Assignment 3 ===
85
edits

Navigation menu