Skip to content

Using a Backtracking algorithm to solve Sudoku boards

Notifications You must be signed in to change notification settings

aimenux/SudokuKata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.NET Core

SudokuKata

Sudoku Kata

The rules of the Sudoku are as follows :

You fill in all the squares in the grid so that each row, column and each of the 3x3 squares contains all the digits from 1 to 9 without repeats or omissions.

N.B : A well-posed board has a single solution in sudoku.

Given a partially completed board:

0 0 6
0 0 0
0 0 0
2 9 0
0 8 6
0 7 0
3 4 0
0 9 2
0 0 1
1 0 0
0 0 8
0 9 0
0 0 8
0 2 0
1 0 0
0 7 0
1 0 0
0 0 8
7 0 0
5 1 0
0 6 4
0 3 0
8 4 0
0 0 0
0 0 0
0 0 0
0 0 0

The solver should give a single result:

8 5 6
3 7 1
2 4 9
2 9 1
4 8 6
5 7 3
3 4 7
5 9 2
6 8 1
1 2 5
4 3 8
6 9 7
3 6 8
9 2 7
1 5 4
4 7 9
1 6 5
2 3 8
7 8 2
5 1 3
9 6 4
6 3 5
8 4 9
7 1 2
9 1 4
7 2 6
8 5 3

Tools : vs19, net core 3.1

About

Using a Backtracking algorithm to solve Sudoku boards

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages