Cody

Problem 45275. Solve Sudoku puzzle step by

Sudoku is a famous puzzle. https://en.wikipedia.org/wiki/Sudoku

Give a standard sudoku by a matrix (9*9), You need give a position(row and column) and a digital(1-9).

For example,

m = [5 0 0 0 0 6 0 0 0
     9 0 0 0 0 0 2 7 0
     0 0 8 0 0 7 4 0 0
     0 2 0 3 9 0 0 0 0
     1 0 0 0 0 0 0 0 8
     0 0 0 0 4 2 0 6 0
     0 0 7 4 0 0 8 0 0
     0 5 1 0 0 0 0 0 4
     0 0 0 6 0 0 0 0 9]

you need to return row = 5, col = 8, d = 2, because the subsquares need number 2 and any other position of this subsquares are forbidden. The solution are not unqiue.

Solution Stats

38.46% Correct | 61.54% Incorrect
Last Solution submitted on Jul 08, 2020

Problem Comments