CHAPTER 4

image

Implementing “Unique”

The “unique” strategy looks for candidates that are unique within a unit. This happens when all other candidates for the same number are removed from the unit (see Figure 4-1).

9781484209967_Fig04-01.jpg

Figure 4-1. “Unique” within a row

If Solver, while applying another strategy, happens to remove the candidates for 5 from cells 7 and 8 of Figure 4-1, the 5 in cell 4 becomes unique within the row and, as a result, the candidates for 4 and 8 in cell 4 can be removed.

To be consistent, the name of this strategy should have been hidden single, ...

Get Sudoku Programming with C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.