Open main menu

CDOT Wiki β

Changes

Algo holics

187 bytes removed, 04:14, 22 February 2019
Assignment 1
<h5>Sudoku Solver</h5>
Is it a program that solves Sudoku puzzles(9X9) using Bruteforce algorithm. Either the The user can either pass a Sudoku files as an input or enter the values manually. Moreover, the file or the manual entry should must strictly have strictly 9 rows and 9 columns in them. LastlyLast but not the least, all the cells should must be separated by a space and the cells that needs to be solved should must have 0 in them as their value.
The original source code can be found at [https://github.com/shafeeq/Sudoku Link]
<h5>LOGIC</h5>
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, Then it moves to the second cell and put 1 in there and again check again if it violating any satisfies all the rulesand conditions. If it is discovers that 1 is not allowed in that celldon't, then the algorithm will increment it 's value to 2 and then check again and if not even . The value can change from 0-9 to find the correct value for a single cell. If none of the value from the range of 0-9 satisfies the cell, then the algorithm program will iterate back to the previous cell and increment change the value of the first cell to 2 and then try the whole process again. By following the same logic In this way it will solve the whole puzzle. 
<h5>Compiling the program</h5>
85
edits