Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/destinecarma/sudoku-solver
https://github.com/destinecarma/sudoku-solver
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/destinecarma/sudoku-solver
- Owner: DestinEcarma
- License: mit
- Created: 2024-06-13T11:37:58.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-28T13:40:53.000Z (2 months ago)
- Last Synced: 2024-11-05T15:18:58.442Z (2 months ago)
- Language: Rust
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sudoku Solver
This project is a Sudoku solver implemented in Rust, utilizing the backtracking algorithm. To enhance efficiency, the solver employs a bitboard representation for each digit within the domain `{1, 2, 3, 4, 5, 6, 7, 8, 9}`. Each bitboard is stored in an array, where advanced bitwise operations are used to check the safety of placing a digit in a square.
## Features
- **Backtracking Algorithm**: A recursive approach to solve the Sudoku puzzle by trying each digit and backtracking when a conflict is detected.
- **Bitboard Representation**: Efficiently stores and manipulates the presence of digits using bitwise operations.## Usage
First, build the executable file or run it directly in release mode for optimal performance:
```sh
cargo build --release
```or
```sh
cargo run --release
```Finally, you can display all available options and commands by running the program with the `-h` or `--help` argument:
```sh
cargo run --release -- -h
```Note: The solver expects a Sudoku puzzle in a string format. Each character in the string represents a cell in the Sudoku grid, where digits `1-9` denote filled cells and `.` represents empty cells.
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.