Skip to content

Instantly share code, notes, and snippets.

@camsaul
Created July 21, 2020 22:44
Show Gist options
  • Save camsaul/22f95867d9b0b6633ce729778de8f3ea to your computer and use it in GitHub Desktop.
Save camsaul/22f95867d9b0b6633ce729778de8f3ea to your computer and use it in GitHub Desktop.
Sudoku Part 2
(def ? '?)
(def unsolved-board
[[5 3 ? ? 7 ? ? ? ?]
[6 ? ? 1 9 5 ? ? ?]
[? 9 8 ? ? ? ? 6 7]
[8 ? ? ? 6 ? ? ? 3]
[4 ? ? 8 ? 3 ? ? 1]
[7 ? ? ? 2 ? ? ? 6]
[? 6 ? ? ? ? 2 8 ?]
[? ? ? 4 1 9 ? ? 5]
[? ? ? ? 8 ? ? 7 9]])
(defn solve [board])
(deftest solve-board-test
(is (= solved-board
(solve unsolved-board))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment