Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 586 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 586 Bytes

sudoku solver

Solves any Sudoku puzzle.

Usage

  1. Clone repository
  2. Run yarn
  3. Create a file called sudoku.txt with the contents listed below
  4. Run node index.js

Input file

The contents of the sudoku.txt file can be:

  • a comment indicated by line starting with a #
  • an empty line
  • an actual line of the input consisting of 9 numbers and optional spaces

Example

# My favorite sudoku
8 0 0 6 0 1 0 0 3
0 0 2 8 0 0 1 0 0
0 5 0 0 0 0 0 7 0
3 2 0 4 0 8 0 1 5
0 0 0 0 0 0 0 0 0
6 8 0 2 0 9 0 4 7
0 6 0 0 0 0 0 8 0
0 0 8 0 0 3 4 0 0
4 0 0 5 0 6 0 0 1