This is a program to solve sudokus.
This implementation uses a backtracking algorithm to fill in the empty cells with valid numbers. The valid() function checks if a given number is valid for a given cell by checking the rows, columns, and 3x3 sub-grid that the cell is in. The find_empty() function returns the next empty cell in the board. The above code is just an example and you may need to adjust it to suit your specific requirements.
- Edit the board inside
sudoku_solver.py
- Run
sudoku_solver.py
- Profit.
clone the repository (no installation required, source files are sufficient):
https://github.com/marcoagbarreto/Sudoku_Solver.git
dependencies:
None
or download and extract the zip into your project folder.
- Sudoku format should be in an array form.