Problem 114. Check to see if a Sudoku Puzzle is Solved
Solution Stats
Problem Comments
-
5 Comments
Seems like my test suite wasn't robust enough, so I've bolstered it with some trickier situations
You should have added a test case with 5*ones(9) as a test matrix.
ur test suite 6 is wrong, isn't it??
@bmtran can you explain why test case #6 (toeplitz variation) is false?
In addition to each row and column needing to have 1 through 9, each 3x3 sub-region must have 1 through 9 as well.
Solution Comments
-
1 Comment
the solution is stating false for S=toeplitz([1 9:-1:2],1:9); but it is true. hence solution failed
-
2 Comments
god!
This solution fails on
input = [ 8 2 4 9 5 3 6 7 1
6 3 5 8 1 9 7 2 4
7 1 9 6 2 4 8 5 3
5 8 7 2 9 1 3 4 6
1 4 2 7 3 6 5 8 9
3 9 6 4 8 5 2 1 7
2 6 1 5 4 7 9 3 8
4 7 8 3 6 2 1 9 5
9 5 3 1 7 8 4 6 2 ]
which is the first assertion test with the 9 and 7 on row 2 and 7 exchanged
-
1 Comment
Test 3 is wrong??
-
2 Comments
wtf awesome
what is going on...
Problem Recent Solvers307
Suggested Problems
-
2052 Solvers
-
7815 Solvers
-
10828 Solvers
-
323 Solvers
-
467 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!