Skip to content

JosiasAurel/sudoku-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sodoku Solver

A brute-force sudoku solver using what I think is backtracking... It's backtracking I promise.

Sudoku is a 9-by-9 game where you get a grid with partially filled numbers and your goal is to fill them such that there are no duplicate numbers on the same column, row and 3-by-3 sub-grid.

Ugh Wikipedia better explains Sudoku I think.

How to solve sudoku

  1. Look over the grid step-by-step
  2. If you encounter an empty slot,
    • Look at the numbers in use on the slots column, row and 3-by-3 sub-grid.
    • Determine what numbers between 0-9 are in neither the column, row or 3-by-3 sub-grid.
  3. continue
  4. If you find yourself in a dead end, move backwards and try a different number
    • If you've exhausted all numbers on the current slot, still move back

This program is written in Zig by yours truly 😸

About

A sudoku solver program in Zig

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published