{"id":20956198,"url":"https://github.com/beliumgl/sudokusolver","last_synced_at":"2025-03-13T06:11:17.789Z","repository":{"id":263268460,"uuid":"889853730","full_name":"beliumgl/SudokuSolver","owner":"beliumgl","description":"C++23 implementation of a Sudoku solver that can solve standard 9x9 Sudoku puzzles (can be modified) using backtracking algorithms. It is designed to be efficient, easy to use, and extendable for future enhancements.","archived":false,"fork":false,"pushed_at":"2024-12-01T09:02:50.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T23:38:16.927Z","etag":null,"topics":["cpp","cpp23","sudoku","sudoku-game","sudoku-puzzle","sudoku-solution-finder","sudoku-solver"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beliumgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-17T12:16:44.000Z","updated_at":"2024-12-01T09:02:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"6bfd5c53-da77-4fca-90c1-3ecf1b3c8bc3","html_url":"https://github.com/beliumgl/SudokuSolver","commit_stats":null,"previous_names":["beliumgl/sudokusolver"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliumgl%2FSudokuSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliumgl%2FSudokuSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliumgl%2FSudokuSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beliumgl%2FSudokuSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beliumgl","download_url":"https://codeload.github.com/beliumgl/SudokuSolver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243352032,"owners_count":20276914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpp","cpp23","sudoku","sudoku-game","sudoku-puzzle","sudoku-solution-finder","sudoku-solver"],"created_at":"2024-11-19T01:24:45.977Z","updated_at":"2025-03-13T06:11:17.771Z","avatar_url":"https://github.com/beliumgl.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sudoku Solver\n\n![Stars](https://img.shields.io/github/stars/beliumgl/sudokusolver?style=social)\n![Forks](https://img.shields.io/github/forks/beliumgl/sudokusolver?style=social)\n\n## Overview\n\nThis project provides a C++23 implementation of a Sudoku solver that can solve standard 9x9 Sudoku puzzles (can be modified) using backtracking algorithms. It is designed to be efficient, easy to use, and extendable for future enhancements.\n\n## Features\n\n- **Backtracking Algorithm**: Utilizes a recursive backtracking algorithm to find solutions.\n- **Dynamic Input**: Accepts Sudoku puzzles as 2D vectors, allowing for easy integration and modification.\n- **Error Handling**: Throws exceptions for unsolvable puzzles, ensuring robust performance.\n- **Modular Design**: Organized into header and source files, making it easy to maintain and extend.\n\n## Getting Started\n\n### Prerequisites\n\nTo build and run this project, you will need:\n\n- A C++ compiler that supports C++23 (e.g., clang++, g++)\n- Git (optional, for cloning the repository)\n\n### Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/beliumgl/sudokusolver.git\n   cd sudokusolver\n2. **Compiling to static library**:\n   ```bash\n   mkdir build \u0026\u0026 cd build\n   cmake ..\n   cmake --build .\n\n### Sample Code\n\n```cpp\n#include \u003csudokusolver/sudokusolver.hpp\u003e\n#include \u003ciostream\u003e\n#include \u003cvector\u003e\n\nint main() {\n    // Define a Sudoku puzzle (. represents empty cells)\n    std::vector\u003cstd::vector\u003cchar\u003e\u003e sudokuTable = {\n        {'.', '.', '.', '1', '2', '3', '.', '8', '.'},\n        {'1', '.', '.', '.', '.', '.', '.', '3', '7'},\n        {'.', '3', '8', '7', '4', '6', '9', '.', '2'},\n        {'3', '4', '5', '8', '1', '7', '6', '2', '9'},\n        {'7', '2', '6', '.', '.', '.', '.', '.', '8'},\n        {'8', '9', '1', '.', '.', '.', '3', '.', '4'},\n        {'.', '.', '7', '9', '5', '1', '2', '4', '3'},\n        {'9', '.', '3', '4', '7', '2', '8', '6', '5'},\n        {'.', '5', '.', '6', '.', '8', '.', '.', '1'}\n    };\n\n    // Create an instance of the Sudoku solver\n    Sudoku solver;\n\n    // Solve the Sudoku puzzle\n    try {\n        solver.solve(sudokuTable);\n        \n        // Print the solved Sudoku puzzle\n        std::cout \u003c\u003c \"Solved Sudoku Puzzle:\" \u003c\u003c std::endl;\n        for (const auto\u0026 row : sudokuTable) {\n            for (char cell : row) {\n                std::cout \u003c\u003c cell \u003c\u003c \" \";\n            }\n            std::cout \u003c\u003c std::endl;\n        }\n    } catch (const std::invalid_argument\u0026 e) {\n        std::cerr \u003c\u003c e.what() \u003c\u003c std::endl; // Handle unsolvable puzzle case\n    }\n\n    return 0;\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeliumgl%2Fsudokusolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeliumgl%2Fsudokusolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeliumgl%2Fsudokusolver/lists"}