Skip to content

Files

Latest commit

 

History

History
30 lines (15 loc) · 1.63 KB

README.md

File metadata and controls

30 lines (15 loc) · 1.63 KB

Sudoku_Solver_Python

Description

This Python program implements a Sudoku solver using a backtracking algorithm. Sudoku is a logic-based number-placement puzzle where the objective is to fill a 9x9 grid with digits so that each column, each row, and each of the nine 3x3 subgrids that compose the grid (also called "boxes" or "regions") contain all of the digits from 1 to 9 exactly once. This program takes an incomplete Sudoku grid as input and attempts to solve it by systematically trying different numbers in empty cells. If a number leads to a dead end, the algorithm backtracks and tries a different number. Once a solution is found, the program displays the completed Sudoku grid.

Features

  • Input Grid: Takes a 9x9 Sudoku grid as input, represented as a list of lists or a similar data structure. 🔢

  • Backtracking Algorithm: Implements a backtracking algorithm to explore possible solutions. 🕵️‍♀️

  • Constraint Checking: Checks if placing a number in a cell violates Sudoku rules (row, column, and 3x3 box constraints). ✅

  • Solution Display: Displays the solved Sudoku grid in a clear and readable format. 👀

  • Solves Valid Puzzles: Solves any valid Sudoku puzzle. 💪

Technologies Used

  • Python: The core programming language for the Sudoku solver logic. 🐍

Ideal For

  • Sudoku Players: Who want a tool to help them solve challenging puzzles. 🎮

  • Students: Learning about algorithms, backtracking, and constraint satisfaction problems. 🧑‍🎓

  • Python Developers: Interested in seeing a practical implementation of a backtracking algorithm. 👨‍💻👩‍💻