Giter VIP home page Giter VIP logo

sudoku-slover's Introduction

数独答案生成器

输入棋盘,输出答案

Input(0代表空):

006050304
000040901
002009006
201094800
000802000
007530209
300900100
509080000
608010400

Output:
┌─────┬─────┬─────┐
│1 9 6│2 5 8│3 7 4│
│7 8 5│6 4 3│9 2 1│
│4 3 2│1 7 9│5 8 6│
├─────┼─────┼─────┤
│2 5 1│7 9 4│8 6 3│
│9 4 3│8 6 2│7 1 5│
│8 6 7│5 3 1│2 4 9│
├─────┼─────┼─────┤
│3 7 4│9 2 6│1 5 8│
│5 1 9│4 8 7│6 3 2│
│6 2 8│3 1 5│4 9 7│
└─────┴─────┴─────┘

此答案生成器使用的并非回溯(暴力)算法,而是通过模拟各种解法来获得固定解题步骤。

因此,会有一部分难度比较大的题目是无法解出的,这部分题目的特征就是需要使用到本程序所录入以外的解法。

已录入的方法有:

  1. 直接摒除法
  2. 唯一解法
  3. 区间摒除法

sudoku-slover's People

Watchers

 avatar  avatar

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.