{"id":20461273,"url":"https://github.com/infectedduck/sudoku-solver-in-c-using-various-methods","last_synced_at":"2025-10-14T18:33:32.310Z","repository":{"id":256791593,"uuid":"851221383","full_name":"InfectedDuck/Sudoku-Solver-In-C-using-various-methods","owner":"InfectedDuck","description":"Sudoku Solver in C using backtracking with heuristics. Features custom input, puzzle generation, and file processing. Solve and validate Sudoku puzzles efficiently.","archived":false,"fork":false,"pushed_at":"2024-09-14T01:36:16.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T11:36:05.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InfectedDuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-09-02T16:54:28.000Z","updated_at":"2024-09-14T01:36:20.000Z","dependencies_parsed_at":"2024-11-15T12:37:36.952Z","dependency_job_id":null,"html_url":"https://github.com/InfectedDuck/Sudoku-Solver-In-C-using-various-methods","commit_stats":null,"previous_names":["infectedduck/sudoku-solver-in-c-using-various-methods"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InfectedDuck/Sudoku-Solver-In-C-using-various-methods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FSudoku-Solver-In-C-using-various-methods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FSudoku-Solver-In-C-using-various-methods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FSudoku-Solver-In-C-using-various-methods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FSudoku-Solver-In-C-using-various-methods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InfectedDuck","download_url":"https://codeload.github.com/InfectedDuck/Sudoku-Solver-In-C-using-various-methods/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FSudoku-Solver-In-C-using-various-methods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020352,"owners_count":26086866,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"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":[],"created_at":"2024-11-15T12:24:34.529Z","updated_at":"2025-10-14T18:33:32.288Z","avatar_url":"https://github.com/InfectedDuck.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sudoku Solver\n\n## Overview\n\nThis project is a Sudoku solver implemented in C. It provides functionality to solve Sudoku puzzles using a backtracking algorithm enhanced with heuristics. Users can input their own puzzles, generate a basic puzzle, or read puzzles from a file and output the solved puzzles to another file.\n\n## Features\n\n- **Solve Sudoku Puzzles**: Uses backtracking and heuristics to solve the puzzle.\n- **Custom Input**: Allows users to input their own Sudoku puzzles.\n- **Puzzle Generation**: Generates a basic Sudoku puzzle with a fixed pattern.\n- **File Processing**: Reads multiple puzzles from a file and writes the solutions to an output file.\n\n## Getting Started\n\nTo get started with the Sudoku solver, follow these steps:\n\n### Compilation\n\n1. Ensure you have a C compiler installed (e.g., `gcc`).\n2. Compile the code using the following command:\n   ```bash\n   gcc -o sudoku_solver sudoku_solver.c\n\n### Options\nUpon running the program, you will be prompted to select one of the following options:\n\n1. **Enter your own Sudoku puzzle**:  \n   Input a Sudoku grid manually. Ensure that the grid is valid with numbers between 0 and 9.\n   \n2. **Generate a random Sudoku puzzle**:  \n   Generates a basic Sudoku puzzle with a fixed pattern.\n   \n3. **Read and solve puzzles from a file**:  \n   Provide an input file containing multiple Sudoku puzzles and an output file to save the solutions.\n\n### Functions\n\n- **`print_grid(int grid[SIZE][SIZE])`**:  \n  Prints the Sudoku grid.\n\n- **`is_safe(int grid[SIZE][SIZE], int row, int col, int num)`**:  \n  Checks if placing `num` in the given cell is valid.\n\n- **`find_empty_location(int grid[SIZE][SIZE], int *row, int *col)`**:  \n  Finds an empty cell in the grid.\n\n- **`solve_sudoku(int grid[SIZE][SIZE])`**:  \n  Solves the Sudoku puzzle using backtracking.\n\n- **`read_grid(int grid[SIZE][SIZE])`**:  \n  Reads the Sudoku grid from user input.\n\n- **`is_valid_grid(int grid[SIZE][SIZE])`**:  \n  Validates the Sudoku grid.\n\n- **`generate_puzzle(int grid[SIZE][SIZE])`**:  \n  Generates a basic Sudoku puzzle.\n\n- **`read_puzzles_from_file(const char *filename, const char *output_filename)`**:  \n  Reads puzzles from a file and writes the solutions to another file.\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT). See the [LICENSE](LICENSE.txt) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfectedduck%2Fsudoku-solver-in-c-using-various-methods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfectedduck%2Fsudoku-solver-in-c-using-various-methods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfectedduck%2Fsudoku-solver-in-c-using-various-methods/lists"}