Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells. The solution must satisfy all of the following rules: each of the digits 1-9 must occur exactly once in each row, each column, and each of the nine 3x3 sub-boxes of the grid. The '.' character indicates empty cells.

Constraints

  • board.length == 9
  • board[i].length == 9
  • board[i][j] is a digit or '.'
  • There is exactly one solution
Saving… · 4 lines
class Solution:
def sudokuSolver(self, board: List[List[str]]) -> bool:
pass

Console

Click Run to execute sample tests.