O'Reilly logo

Sudoku Programming with C by Giulio Zambon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 12

image

Implementing “Rectangle”

The rectangle strategy is the first level 3 strategy that is not an extension of easier ones. As I explained in Chapter 2, this strategy relies on sets of cells that form rectangular patterns. You implement it with the functions rectangle(), rectangle_pattern(), rectangle_cell(), and rectangle_step() (see Listings 12-1, 12-2, 12-3, and 12-4, respectively).

rectangle()

To program the rectangle strategy, you need to check all possible rectangular patterns of cells and follow the chain around the four boxes that contain the corners of the patterns.

Only the following nine combinations of four boxes are possible: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required