[NFBCS] Sudoku

dan.tevelde at comcast.net dan.tevelde at comcast.net
Wed Mar 16 22:14:15 UTC 2022


Hi Aaron,

Your mention of the boxes is what I'm having trouble grasping. I can easily
read the contents of the 9 arrays using a Braille display. The arrays are
separated by brackets which is to be expected. The exercise I am supposed to
complete requires the user to look at a puzzle to see if it is valid and
then return true or false. The JavaScript function would be easy to write.
The tricky part is reading the puzzle to determine if it is valid. It's hard
to isolate the 3 column boxes.

Thanks,'
Dan

-----Original Message-----
From: NFBCS <nfbcs-bounces at nfbnet.org> On Behalf Of Aaron Cannon via NFBCS
Sent: Wednesday, March 16, 2022 3:38 PM
To: NFB in Computer Science Mailing List <nfbcs at nfbnet.org>
Cc: Aaron Cannon <cannona at fireantproductions.com>
Subject: Re: [NFBCS] Sudoku

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
_______________________________________________
NFBCS mailing list
NFBCS at nfbnet.org
http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
To unsubscribe, change your list options or get your account info for NFBCS:
http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/dan.tevelde%40comcast.net




More information about the NFBCS mailing list