Stare at this board for three seconds. Does it look valid to you? Most people say yes — the numbers seem spread out, nothing jumps out as obviously wrong. That instinct is the trap this lesson is built around.

A valid Sudoku requires each row, each column, and each 3x3 box to contain digits 1-9 at most once. Given a board with some cells filled (others empty as .), decide whether the filled cells are CONSISTENT — empty cells are ignored.

input: board
output: boolean
trueorfalse

Is THIS specific board valid? You will decide by the end of the next phase.

— The hidden puzzle:Three constraints, nine of each — that is 27 checks minimum. Can you do it in ONE pass through the 81 cells? That is the puzzle behind the puzzle.

Before we start: which constraint feels hardest to verify AT A GLANCE, just by scanning the board?