Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alex Holland - Technical Challenge Submission #87

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexwholland
Copy link

Sudoku Implementation

The Go implementation introduces a Sudoku solver that combines cross-hatching and recursive backtracking for improved performance. It efficiently scans rows and columns to identify potential values, employing systematic prioritization of almost-filled elements for enhanced solving. The solver validates board dimensions and numbers, using recursive backtracking to find a solution. The printBoard function aids in displaying the solved board in a readable json format.

Test Cases

The Sudoku solver test suite covers a range of scenarios. It ensures correct solutions for standard puzzles, including those with incomplete rows, columns, and blocks. Additionally, it checks the solver's ability to handle puzzles with a single empty cell, already completed puzzles, and challenging ones like the world's hardest Sudoku by Arto Inkala. The suite also assesses robustness by testing invalid board dimensions, layouts, and numbers, providing comprehensive validation of the solver's functionality.

Instructions

Execute the tests: go test
Run the program and display output: go run sudoku.go

Component Name

sudoku.go
sudoku_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant