Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1.09 KB

96. Su Doku.md

File metadata and controls

23 lines (15 loc) · 1.09 KB

Question

The objective of Su Doku puzzles is to replace the blanks (or zeros) in a 9 by 9 grid in such that each row, column, and 3 by 3 box contains each of the digits 1 to 9.

A well constructed Su Doku puzzle has a unique solution and can be solved by logic, although it may be necessary to employ "guess and test" methods in order to eliminate options (there is much contested opinion over this). The complexity of the search determines the difficulty of the puzzle.

The 6K text file, sudoku.txt, contains fifty different Su Doku puzzles ranging in difficulty, but all with unique solutions.

By solving all fifty puzzles find the sum of the 3-digit numbers found in the top left corner of each solution grid; for example, 483 is the 3-digit number found in the top left corner of the solution grid above.

Solution

I lost the code I wrote for this one :(

Need to find some time to write a new one.

It's a fun question that can be solved with backtracking.

Answer

24702