Skip to content

monmee/sudoku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Challenge

The goal of this challenge is to implement algorithm to solve given 3 sudoku puzzles.

Challenge Description

  • A sudoku is type of puzzle made out of 9x9 (81) numbers/cells which is considered to be further divided into 9 sub-grids of 3x3 matrix.

  • A valid sudoku contains the numbers 1-9 each 9 times while not breaking one simple rule: "A sub-grid, column or row can only contain each number once".

    i.e Sudoku puzzle can be viewed as matrix is 9x9.

    • Rows are counted from top to bottom.
    • Rows are horizontal, counted vertically, defined by y.
    • Columns are counted from left to right.
    • Columns are counted horizontally, defined by x

Sudoku Puzzle

Information

The application will send you 3 different sudoku puzzles in the form of two-dimensional array. You can refer the testsudoku.py to see the details of tests you need to pass.

Note:

  • You should use Solve function in sudoku.py to solve the challenge.
  • Some sudoku has multiple solutions, but all of puzzles we provide have a unique solution.

Puzzle 1

         
  98 51  
 519 742 
29 4 1 65
         
14 5 8 93
 267 958 
  51 36  
         

Puzzle 2

  3 2 6  
9  3 5  1
  18 64  
  81 29  
7       8
  67 82  
  26 95  
8  2 3  9
  5 1 3  

Puzzle 3

9 42    7
 1       
   7 65  
   8   9 
 2 9 4 6 
 4   2   
  16 7   
       3 
3    57 2

Test Results before solving the challenge

Initially all the tests will fail with following output

codecheck: Finish with code 1
codecheck: tests  : 3
codecheck: success: 0
codecheck: failure: 3

Test Results after solving the challenge

Solve the challenge to pass the tests

codecheck: Finish with code 0
codecheck: tests  : 3
codecheck: success: 3
codecheck: failure: 0

Run Tests

To run tests locally install codecheck in local environment by running following command in terminal.

$ npm install codecheck -g

To run tests locally, run codecheck command in terminal in the root folder To run tests in web editor please click on RUN button on left side of web editor

Explain your code

In answer.md write a brief explanation

  • About how your code works
  • Problems faced while solving the challenge
  • How you solved those problems

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%