A fully functional Sudoku Solver built in Java using Backtracking.
Created by Asmit Mandal(Asmit159), this project can solve any valid 9ร9 Sudoku โ
either entered manually through the console or uploaded via a text file.
๐ป Javaโ๐ข Sudoku Solverโ๐งฉ Backtrackingโ๐ Recursionโ๐ Console Application
๐ File I/Oโ๐ค User Inputโโ๏ธ Algorithmโ๐ Data Structuresโ๐ฏ Problem Solving
โจ Open Sourceโ๐ Coding Challengeโ๐ Programming Exerciseโ๐ Portfolio Project
๐ Beginner Friendlyโ๐ฅ Algorithm Practiceโ๐ก Coding Projectโ๐ Java Projects
- โ Solves any standard 9ร9 Sudoku using recursion and backtracking.
- ๐ฅ๏ธ Accepts manual console input or text file input (
.txtformat). - ๐ง Efficient safety checks for row, column, and 3ร3 subgrid.
- ๐ Prints the completed Sudoku grid neatly in the console.
- ๐ Author permission required before forking or redistribution.
- ๐ฎReact UI for users to interact easily(Future upgrade)
- Run the program.
- Enter each Sudoku row (9 numbers separated by space).
- Use 0 for blank cells.
- The solved Sudoku will be displayed in the console.
- Create a text file (e.g.,
sudoku.txt) containing the Sudoku grid.
Example:
- 0 0 8 0 0 0 0 0 0
- 4 9 0 1 5 7 0 0 2
- 0 0 3 0 0 4 1 9 0
- 1 8 5 0 6 0 0 2 0
- 0 0 0 0 2 0 0 6 0
- 9 6 0 4 0 5 3 0 0
- 0 3 0 0 7 2 0 0 4
- 0 4 9 0 3 0 0 5 7
- 8 2 7 0 0 9 0 1 3
- Run the program and choose the file input option.
- Enter the file path when prompted.
- Backtracking:
Tries placing digits (1โ9) in each empty cell.
Checks if the placement is safe (row, column, subgrid).
If not valid, it backtracks and tries another number.
The recursion continues until the entire Sudoku is solved.
Asmit Mandal
- GitHub: Asmit159
- LinkedIn: asmit-mandal-aa300a374
This project is an original work by Asmit Mandal.
Any forking, redistribution, or modification of this code requires explicit author permission.
โญ If you find this project useful, consider starring the repo to support the developer!