Skip to content
This repository was archived by the owner on Apr 27, 2025. It is now read-only.

Commit fe57464

Browse files
authored
Update 37. Sudoku Solver.md
1 parent 6872af1 commit fe57464

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

37. Sudoku Solver.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ A sudoku puzzle...
3232

3333
class Solution {
3434
static let num: [Character] = ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
35+
3536
func solveSudoku(_ board: inout [[Character]]) {
3637
var clo = [Set<Character>].init(repeating: Set<Character>(), count: 9)
3738
var row = [Set<Character>].init(repeating: Set<Character>(), count: 9)
@@ -49,9 +50,9 @@ class Solution {
4950
}
5051
_ = fillGrid(index: 0, board: &board, clo: &clo, row: &row, block: &block)
5152
}
52-
53-
54-
func fillGrid(index: Int,
53+
54+
55+
func fillGrid(index: Int,
5556
board: inout [[Character]],
5657
clo: inout [Set<Character>],
5758
row: inout [Set<Character>],
@@ -89,8 +90,10 @@ class Solution {
8990
}
9091
return false
9192
}
93+
9294
}
9395

96+
9497
```
9598

9699

@@ -176,7 +179,7 @@ class Solution {
176179
[".",".",".","4","1","9",".",".","5"],
177180
[".",".",".",".","8",".",".","7","9"]]
178181
179-
扫描遍历尝试填充4208次,按权重遍历调用fillGrid 340次
182+
扫描遍历调用fillGrid 4208次,按权重遍历调用fillGrid 340次
180183
181184
```
182185

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy