Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 879 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 879 Bytes

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 😸