Giter VIP home page Giter VIP logo

sudoku_solver's Introduction

๐Ÿงฉ Sudoku Solver ๐Ÿงฉ

This is a Java program that solves a given Sudoku puzzle using backtracking algorithm. It has a simple command-line interface and can solve any valid Sudoku puzzle within seconds.

๐Ÿš€ Getting Started

  1. Clone the repository using the following command:
git clone https://github.com/hasnain-kk/sudoku_solver.git
  1. Open the project in your favorite Java IDE.
  2. Compile and run the SudokuSolver.java file.
  3. Enter the Sudoku puzzle row by row. Use 0 or any negative number to represent empty cells.
  4. Wait for the program to solve the puzzle.
  5. The solution will be displayed on the console.

๐Ÿ“ How It Works

The Sudoku Solver uses a backtracking algorithm to solve the puzzle. It tries different numbers for each empty cell until a solution is found. If the number is not valid for the current cell, it backtracks to the previous cell and tries a different number.

๐Ÿ” Algorithm Overview

The algorithm used in this program can be summarized in the following steps:

  1. Find the first empty cell in the grid.
  2. Try all numbers from 1 to 9 in the cell.
  3. If a number is valid for the cell, move to the next empty cell and repeat step 2.
  4. If all numbers have been tried and no number is valid for the cell, backtrack to the previous cell and try a different number.
  5. Repeat steps 2-4 until a solution is found or all possible combinations have been tried.

๐Ÿค– Technical Details

The Sudoku Solver is written in Java and uses a simple command-line interface. It uses a backtracking algorithm to solve the puzzle and can solve any valid Sudoku puzzle within seconds.

๐Ÿ‘จโ€๐Ÿ’ป Contribution Guidelines

If you find any bugs or issues with the program, feel free to open an issue or submit a pull request. Any contributions are welcome!

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

sudoku_solver's People

Contributors

hasnain-kk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.