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 1

image

Modeling a Sudoku Puzzle in C

The purpose of this book is to teach you how to write computer programs to solve and generate Sudoku puzzles. This chapter introduces you to the Solver and the Generator programs and describes the notation I use throughout the book for Sudoku puzzles and how I represent Sudoku grids in C.

Solving a Puzzle

Each blank cell in a Sudoku puzzle offers nine possible candidates. You solve a Sudoku by applying a series of strategies that let you remove candidates from the puzzle’s cells. The solution is complete when only one candidate remains in each cell.

Some strategies are simple. Perhaps the simplest one of ...

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