Skip to content

A web application designed to solve Sudoku puzzles using the powerful Backtracking algorithm.

License

Notifications You must be signed in to change notification settings

ayushichoudhary-19/SudokuSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧩 SudokuSolver

Welcome to the Sudoku Solver, a web application designed to solve Sudoku puzzles using the powerful Backtracking algorithm. This interactive tool is built with JavaScript, providing an intuitive way to solve Sudoku puzzles and gain insights into this classic number puzzle game.

[Please give a ⭐ to this repo if you like my work :)]


🌐 Live Website Demo

🔗 https://ayushichoudhary-19.github.io/SudokuSolver/

Image

🧩 Sudoku Puzzle

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

🛠️ Tech Stack

HTML CSS JavaScript (JS) VS Code

  • JavaScript: Utilized for the Backtracking algorithm and interactivity.
  • HTML: Used for structuring the web page.
  • CSS: Provides styling to create an appealing user interface.

🤔 What's a Sudoku Puzzle?

A Sudoku puzzle is a number puzzle or logic game. The puzzle consists of a 9x9 grid, divided into nine 3x3 subgrids, also known as "regions" or "boxes." The objective of Sudoku is to fill in the entire grid with numbers so that each row, each column, and each 3x3 subgrid contains all of the digits from 1 to 9, with no repetition of numbers in any of these regions.

📜 Basic Rules :

  1. Each row must contain all the numbers from 1 to 9, with no repetition.

  2. Each column must also contain all the numbers from 1 to 9, with no repetition.

  3. Each of the nine 3x3 subgrids must contain all the numbers from 1 to 9, with no repetition.

📚 How to Use the Solver

  1. Input Your Puzzle: Enter the Sudoku puzzle by filling in the numbers in the grid. Use "0" or leave cells empty for unknown values.

  2. Click "Solve": Once you've input your puzzle, click the "Solve" button.

  3. View the Solution: The solver will utilize the Backtracking algorithm to find a solution. Once solved, the completed puzzle will be displayed.

🧰 Solving with Backtracking

The Sudoku Solver employs the Backtracking algorithm to find solutions efficiently. Backtracking is a recursive technique that explores potential solutions and backtracks when it encounters inconsistencies, ultimately leading to a valid solution or indicating that no solution exists. This algorithm is particularly well-suited for solving Sudoku puzzles, as it efficiently explores the puzzle space and ensures the validity of each move.

📄 License

This project is open source and available under the MIT License.


Note: You are welcome to clone and customize this Sudoku Solver for your own projects. Explore the code and adapt it to your needs, or contribute to its development on GitHub.

Releases

No releases published

Packages

No packages published