https://github.com/fuhsnn/c23doku
Arbitrary-size Sudoku solver written in C23/C2Y to explore latest C language features
https://github.com/fuhsnn/c23doku
c c23 c2y sudoku sudoku-solver
Last synced: 2 months ago
JSON representation
Arbitrary-size Sudoku solver written in C23/C2Y to explore latest C language features
- Host: GitHub
- URL: https://github.com/fuhsnn/c23doku
- Owner: fuhsnn
- License: mit
- Created: 2024-07-31T15:23:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-15T16:34:38.000Z (10 months ago)
- Last Synced: 2025-09-15T18:24:51.254Z (10 months ago)
- Topics: c, c23, c2y, sudoku, sudoku-solver
- Language: C
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A set of amateur Sudoku solvers implemented with features from C23 and C2Y standard.
- `brute_force.c`: Use `_BitInt()` to encode constraints of the entire board in a single integer.
- `graph_color.c`: Use `` to decode constraint bitmasks of each cell.
- `16x16_embed/puzzle.h`: Use `#embed` to load board in a file in compile-time.
- `_c2y.c` variants: `if` declaration and named loop.
Subgrid can be any rectangular as long as `(X*Y)<=61`, board size is implicitly `(X*Y)*(Y*X)`.
## Building
`cc -O2 -std=c23 {pick-algo}.c -I ./{pick-board} -o out && ./out`
Compiler/libc requirements:
- ``: `glibc` v2.39+
- C23 features: `gcc-14(#embed needs 15)`, `clang-19`, `kefir 0.5`, `slimcc`
- C2Y `if` declaration and named loop: `gcc-15`, `slimcc`