|
3 | 3 | ##Description:
|
4 | 4 | * Solves Sudoku puzzles.
|
5 | 5 | * Takes input from console, ignoring all characters except the digits 0-9.
|
6 |
| -* Once 81 digits have been imputed, the solution will be outputted. |
| 6 | +* Once 81 digits have been inputted, the solution will be outputted. |
7 | 7 |
|
8 | 8 | ##Usage:
|
9 |
| -* To compile: javac Sudoku.java |
10 |
| -* To run: java Sudoku |
11 |
| -* To run with file input: java Sudoku < file.txt |
| 9 | +* To compile: `javac Sudoku.java` |
| 10 | +* To run: `java Sudoku` |
| 11 | +* To run with file input: `java Sudoku < file.txt` |
12 | 12 |
|
13 | 13 | ##Output description:
|
14 |
| -* If there is more than one solution, the program outputs one valid solution. |
15 | 14 | * Outputs whether a puzzle has no solution, a single solution, or multiple solutions.
|
| 15 | +* If there is more than one solution, the program outputs one valid solution. |
16 | 16 | * Outputs the number of cells that were solved with each technique if the puzzle has a solution.
|
17 | 17 |
|
18 | 18 | ###Techniques:
|
19 | 19 | * Given - A cell that was inputted.
|
20 |
| -* Single - A cell that was solved because it only has one candidate. |
21 |
| -* Hidden single - A cell that was solved because it had a candidate that appeared only once in its row, column or 3x3 block. |
| 20 | +* Single - A cell that was solved because it had only one candidate (posible value). |
| 21 | +* Hidden single - A cell that was solved because it had a candidate that appeared only once in its row, column, or 3x3 block. |
22 | 22 | * 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.
|
23 | 23 | * Guess - A cell that was solved by guessing.
|
24 | 24 |
|
25 | 25 | If the puzzle cannot be solved using singles, hidden singles, or intersections, the program will make guesses until it reaches a solution.
|
26 | 26 |
|
27 |
| -See sampleinput.txt and sampleoutput.txt for example input and output. |
| 27 | +See sampleinput.txt and sampleoutput.txt for example input and output. |
0 commit comments