solve static method
Solves the provided sudoku
and returns the solved puzzle.
Might return different solutions everytime if the puzzle has more than
one solution.
The sudoku
must be a List of 9 Lists of 9 ints and empty squares
should be represented by null
or 0
.
InvalidSudokuConfigurationException is thrown if the configuration of
the sudoku
is not valid.
Implementation
static List<List<int>> solve(List<List<int?>> sudoku) {
var _solvedGrid = SudokuUtilities.makeNullSafe(sudoku);
_solveImplementation(_solvedGrid);
return _solvedGrid;
}