Posts

Showing posts with the label solver

Solving Sudoku

Image
What is Sudoku? So, before getting into the details of solving Sudoku with a computer program, before discussing its algorithm and going through all its steps, it’s only fair to introduce the game of Sudoku to everyone who’s unaware of what Sudoku is, or someone who kinda knows what it is, but has forgotten the exact rules. So, here’s what Sudoku is : (image source: https://en.wikipedia.org/wiki/Sudoku ) Sudoku is a number puzzle seen as a 9x9 grid that’s only partially filled by numbers from 1 to 9. The user has to completely fill in all the blank spaces, following 3 basic rules : 1 .  All the rows  of the Sudoku should have all the numbers (from 1 to 9) 2 .  All the columns should   have all the numbers (from 1 to 9) 3 .  And each of the sectors should   have all the numbers (again, from 1 to 9) Sectors are the smaller boxes (3x3) within the Sudoku, marked usually with thicker lines. The above image is an example of a Sudoku puzzle. It’s fairly