Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/intrepidcoder/sudoku.java

Solves sudoku puzzles using Java.
https://github.com/intrepidcoder/sudoku.java

Last synced: 5 days ago
JSON representation

Solves sudoku puzzles using Java.

Awesome Lists containing this project

README

        

#Sudoku.java

##Description:
* Solves Sudoku puzzles.
* Takes input from console, ignoring all characters except the digits 0-9.
* Once 81 digits have been inputted, the solution will be outputted.

##Usage:
* To compile: `javac Sudoku.java`
* To run: `java Sudoku`
* To run with file input: `java Sudoku < file.txt`

##Output description:
* Outputs whether a puzzle has no solution, a single solution, or multiple solutions.
* If there is more than one solution, the program outputs one valid solution.
* Outputs the number of cells that were solved with each technique if the puzzle has a solution.

###Techniques:
* Given - A cell that was inputted.
* Single - A cell that was solved because it had only one candidate (posible value).
* Hidden single - A cell that was solved because it had a candidate that appeared only once in its row, column, or 3x3 block.
* Intersection - A cell that was solved because one or more of its candidates were eliminated because they had to occur in another intersecting row, column, or block.
* Guess - A cell that was solved by guessing.

If the puzzle cannot be solved using singles, hidden singles, or intersections, the program will make guesses until it reaches a solution.

See sampleinput.txt and sampleoutput.txt for example input and output.