ogu

ogu / SudokuSolver / 0.1.0

README.md

A sudoku solver service.

Input

Array of string, Each element in this array has 3 digits, 

  • first digit is row
  • second is column
  • third is value  
Each element corresponds to a field on Sudoku board.

Output

Solution as int[][] Array. Array of rows. Each row contains 9 values.

Example

 -----------------------
|   4 3 | 7     | 9   8 |
|     5 |   3   |       |
|   1   |       | 3     |
 -----------------------
| 6     |   2 7 |       |
| 4   7 |       | 1   3 |
|       | 5 4   |     9 |
 -----------------------
|     2 |       |   3   |
|       |   5   | 4     |
| 5   4 |     1 | 2 6   |
 -----------------------
 -----------------------
| 2 4 3 | 7 1 6 | 9 5 8 |
| 9 8 5 | 2 3 4 | 7 1 6 |
| 7 1 6 | 8 9 5 | 3 4 2 |
 -----------------------
| 6 3 9 | 1 2 7 | 5 8 4 |
| 4 5 7 | 9 6 8 | 1 2 3 |
| 8 2 1 | 5 4 3 | 6 7 9 |
 -----------------------
| 1 6 2 | 4 7 9 | 8 3 5 |
| 3 7 8 | 6 5 2 | 4 9 1 |
| 5 9 4 | 3 8 1 | 2 6 7 |
 -----------------------


Contents