Skip to content

aochagavia/sudoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku

Crates.io Status

A Rust library with the only goal of solving sudokus

Usage Example

extern crate sudoku;

use sudoku::Sudoku;

fn main() {
    // Pipes are ignored, you can also omit them
    let sudoku_str = "\
___|2__|_63
3__|__5|4_1
__1|__3|98_
___|___|_9_
___|538|___
_3_|___|___
_26|3__|5__
5_3|7__|__8
47_|__1|___";

    let mut sudoku = Sudoku::from_str(sudoku_str).unwrap();
    sudoku.solve();
    println!("{}", sudoku);
}

To do list

  • C bindings
  • Replace usages of HashSet by a special struct based on a u16 (we can use each bit as a boolean flag to indicate if the number at the given index is present)
  • Benchmarks
  • Algorithm improvements

About

A library to solve sudokus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages