Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/intrepidcoder/sudoku.java
- Owner: intrepidcoder
- Created: 2013-11-03T21:41:05.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-08T04:02:06.000Z (about 8 years ago)
- Last Synced: 2023-07-31T13:59:18.339Z (over 1 year ago)
- Language: Java
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.