Skip to content

Latest commit

 

History

History
81 lines (33 loc) · 1.65 KB

File metadata and controls

81 lines (33 loc) · 1.65 KB

中文文档

Description

Write a program to solve a Sudoku puzzle by filling the empty cells.

A sudoku solution must satisfy all of the following rules:

    <li>Each of the digits&nbsp;<code>1-9</code> must occur exactly&nbsp;once in each row.</li>
    
    <li>Each of the digits&nbsp;<code>1-9</code>&nbsp;must occur&nbsp;exactly once in each column.</li>
    
    <li>Each of the the digits&nbsp;<code>1-9</code> must occur exactly once in each of the 9 <code>3x3</code> sub-boxes of the grid.</li>
    

Empty cells are indicated by the character '.'.


A sudoku puzzle...


...and its solution numbers marked in red.

Note:

    <li>The given board&nbsp;contain only digits <code>1-9</code> and the character <code>&#39;.&#39;</code>.</li>
    
    <li>You may assume that the given Sudoku puzzle will have a single unique solution.</li>
    
    <li>The given board size is always <code>9x9</code>.</li>
    

Solutions

Python3

Java

...