{"id":19280291,"url":"https://github.com/sraaphorst/sudoku_constexpr","last_synced_at":"2026-06-09T20:31:42.991Z","repository":{"id":84878084,"uuid":"150997022","full_name":"sraaphorst/sudoku_constexpr","owner":"sraaphorst","description":"Compile-time (constexpr) Sudoku board solver","archived":false,"fork":false,"pushed_at":"2018-11-02T17:10:14.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T21:44:46.115Z","etag":null,"topics":["backtracking","backtracking-algorithm","compile-time","constexpr","cpp14","cpp17","sudoku","sudoku-solver"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sraaphorst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-30T19:01:34.000Z","updated_at":"2018-11-02T17:10:16.000Z","dependencies_parsed_at":"2023-03-02T21:45:35.614Z","dependency_job_id":null,"html_url":"https://github.com/sraaphorst/sudoku_constexpr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sraaphorst/sudoku_constexpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sraaphorst%2Fsudoku_constexpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sraaphorst%2Fsudoku_constexpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sraaphorst%2Fsudoku_constexpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sraaphorst%2Fsudoku_constexpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sraaphorst","download_url":"https://codeload.github.com/sraaphorst/sudoku_constexpr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sraaphorst%2Fsudoku_constexpr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34125332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backtracking","backtracking-algorithm","compile-time","constexpr","cpp14","cpp17","sudoku","sudoku-solver"],"created_at":"2024-11-09T21:17:42.536Z","updated_at":"2026-06-09T20:31:42.966Z","avatar_url":"https://github.com/sraaphorst.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sudoku_constexpr\n\n**Status:** Complete, verson 1.0.0.\n\nThis is a C++17 constexpr implementation of a Sudoku board solver, i.e. it solves Sudoku boards\nat compile-time.\n\n(It could be easily modified to run under C++14 if one eliminated the tuple binding.)\n\nThis uses a primitive backtracking approach, and is thus not meant for serious use,\nbut just as an exercise in exploring compile-time implementations of algorithms.\n\nEfficient Sudoku solvers rely on more advanced techniques than naive backtracking, with one of\nthe most common techniques using Donald Knuth's \"algorithm X\" (generally called DLX or Dancing\nLinks).\n\nI have an implementation of DLX and a Sudoku solver using DLX coded in C and Python.\n\nThe Python implementation can be found here on GitHub:\n\nhttps://github.com/sraaphorst/dlxpy/blob/master/examples/sudoku.py\n\n## Performance\n\nUsing what is considered an expert-level Sudoku board (as hard-coded in the implementation), on my MacBook, compilation takes approximately 3.5 minutes.\n\nUsing the well-known, extreme Sudoku from here (also hard-coded in the implementation):\n\nhttps://www.telegraph.co.uk/news/science/science-news/9359579/Worlds-hardest-sudoku-can-you-crack-it.html\n\ncompilation takes slightly over 20 minutes on my MacBook.\n\n## Compilation\n\nThis may not run under GCC due to GCC complaining that the call to solve is not actually `constexpr`. I suggest using clang instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsraaphorst%2Fsudoku_constexpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsraaphorst%2Fsudoku_constexpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsraaphorst%2Fsudoku_constexpr/lists"}