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!