Home / Portfolio / Sudoku Solver
LOGIC2026

Sudoku Solver.

Backtracking solver written in pure C. Live demo below.

A classic constraint-satisfaction problem solved with recursive backtracking. The solver validates a candidate digit against its row, column, and 3×3 box before placing it; when the search hits a dead end, it unplaces and tries the next digit.

The C source is the original I wrote — the browser runs a faithful JavaScript port of the same logic so you can watch the recursion work in real time.

Live demo

Try it yourself.

The grid starts with a sample puzzle. You can edit any cell (1–9), or clear the grid and enter your own. Hit Solve to watch the solver walk the search tree. Blue cells are candidates being tried, chartreuse cells are confirmed solutions.

Given
Trying
Solved
Example puzzle loaded. Hit Solve to watch it work.
Start · Next

Need a small script like this?

Logic work, automation scripts, and clean backtracking algorithms — send a brief.

Start a Project →