Cody

Solution 2041759

Submitted on 2 Dec 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
x=[ 1 5 4; 8 6 3; 0 9 7]; y_correct=[ 1 5 4; 8 6 3; 2 9 7]; assert(isequal(sudoku(x),y_correct))

u = 0 1 3 4 5 6 7 8 9 c = 1 2 3 4 5 6 7 8 9

Error using unique (line 117) Invalid input. Valid flags are 'rows', 'first', 'last', 'stable', 'sorted', 'legacy'. Error in sudoku (line 4) unique(u,c) Error in Test1 (line 7) assert(isequal(sudoku(x),y_correct))

2   Fail
x=[ 8 3 0; 2 7 1; 5 4 6]; y_correct=[ 8 3 9; 2 7 1; 5 4 6]; assert(isequal(sudoku(x),y_correct))

u = 0 1 2 3 4 5 6 7 8 c = 1 2 3 4 5 6 7 8 9

Error using unique (line 117) Invalid input. Valid flags are 'rows', 'first', 'last', 'stable', 'sorted', 'legacy'. Error in sudoku (line 4) unique(u,c) Error in Test2 (line 7) assert(isequal(sudoku(x),y_correct))