Sudoku Solver in Rust

February 15, 2017   

For one of my first assignments in CS 2420 (Data Structures and Algorithms) at the University of Utah, we were tasked with writing sudoku solvers using both a constraint-based algorithm and a recursive brute force algorithm. While the assignment was initially in Java, I currently have an interest in learning Rust, so I decided to implement the recursive solver in Rust as well. The source code can be found here. It is very fast, solving even a 17 clue puzzle (the minimum possible with a unique solution), in just over a millisecond. While the code is likely not the cleanest (since it was one of my first attempts at writing Rust), it was still a fun exercise. Stay tuned for write-ups on more personal projects in the near future.

comments powered by Disqus