noahhendrix / sudoku-solver

A Sudoku solver using backtracking to solve puzzles.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple class that solves Sudoku puzzles using recursive backtracking. There are 3 puzzles included for demonstration purposes.

To run the program you simply pass in the name of a puzzle file you want to solve:

> make
> ./Sodoku puzzle.txt

In the puzzle template files blank spots are represented by underscores, "_". A line return is also required after each sequence of 9 characters representing rows in the puzzle.

Here is an example file:


_1_4____2
__4_72___
_83__5_7_
_382_7___
_521_483_
___5_372_
_2_3__94_
___72_6__
9____6_1_

About

A Sudoku solver using backtracking to solve puzzles.