# Sudoku Solver/Generator Source-Code

2005-11-21

![](https://www.ohad.com/assets/etc/blog/sudoku.jpg)

Here's some straight-to-the-point source-code for solving and generating Sudoku boards.
It's targeted at embedded systems, so stuff will run fast and memory consumption is rather low.

I'm putting it here mainly so that people can find it through google and have some of the Sudoku programming-problems solved. The source-code is heavily commented, so hopefully it'll do some good.

Here we go:

[common.h](https://www.ohad.com/assets/etc/files/sudoku/common.h.html), [os.h](https://www.ohad.com/assets/etc/files/sudoku/os.h.html) (just common stuff)
[Board.h](https://www.ohad.com/assets/etc/files/sudoku/board.h.html), [Board.cpp](https://www.ohad.com/assets/etc/files/sudoku/board.cpp.html) (The core stuff)
[SudokuZen.cpp](https://www.ohad.com/assets/etc/files/sudoku/sudokuzen.cpp.html) (Usage example)

A package that may compile: [SudokuZen.zip](https://www.ohad.com/assets/etc/files/sudoku/sudokuzen.zip)
The picture was drawn by my [brother](http://www.flickr.com/photos/eladx/), for a game we never released.
