GithubHelp home page GithubHelp logo

sudoku's Introduction

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

sudoku's People

Contributors

ravineport avatar code-project avatar

Watchers

James Cloos avatar

Forkers

monmee

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.