Skip to content

Latest commit

 

History

History
6 lines (6 loc) · 982 Bytes

README.md

File metadata and controls

6 lines (6 loc) · 982 Bytes

sudoku-solutionchecker

A program to check whether a sudoku puzzle is correctly solved or otherwise.
For more information on how to solve sudoku check this link

The solution is done with a naive approach, hence, no complex graph-searching algorithm was applied. Instead, I used set difference (a unique feature of Python) to determine whether a row, a column, or a sub-grid of 3x3 dimension really satisfies the condition of having the number 1-9 within the given section of the 9x9 grid.

There are two solutions available. The first one has a straightforward 'YES' or 'NO' output. In addition to the first solution's answer, the second one also holds the explanation of why the grid was not properly filled, with the expense of longer running time (Worst case, every section of the grid will be assessed)