CHAPTER 5

image

Implementing “Naked” Strategies

The three naked strategies, naked pair, naked triple, and naked quad, work on the same general principle: unit by unit, first make a list of all the cells containing naked multiples (i.e., pairs, triples, or quads), and then process the multiples that appear the correct number of times within the unit. If it sounds confusing, read on and it will become clear.

To avoid repeated explanations, let’s start by saying that the implementation of each naked strategy consists of two functions, one applying the strategy to a specific unit and one executing the unit function for each unit (i.e., row, column, and ...

Get Sudoku Programming with C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.