[NFBCS] Sudoku

Aaron Cannon cannona at fireantproductions.com
Wed Mar 16 20:38:26 UTC 2022


Hi.

I've done this. It's a pretty fun exercise, though in my case, I built a
solver, which is a subset of the problem you are solving.

Sudoku puzzles are a grid of 9 by 9 numbers. They are divided up into rows,
columns, and 9 boxes. You didn't say if you need to validate that a solved
puzzle is a valid solution, or if an unsolved puzzle is valid because it
has one and only one valid solution, so I will assume the former.
Basically, in order to confirm this, you need to check each row, column,
and box, to confirm that they each have one of each of the digits 1 through
9, and that no cells are left blank.

This is a reasonably simple problem. The trickiest part is figuring out
which box a given cell is in. box 1 is column 0 through column 2, and row 0
through row 2. Box 2 is column 3-6, rows 0-2, etc.

Let me know if I can be of any further assistance.

Aaron


More information about the NFBCS mailing list