Cody

Solution 890100

Submitted on 15 May 2016 by Richard Zapor
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   Pass
m=[1 2 3 4;5 6 7 8;9 10 11 12;13 15 14 16]; assert(isequal(fifteen_check(m),0))

2   Pass
m=[1 2 3 4;5 6 7 8;9 10 11 12;13 14 16 15]; assert(isequal(fifteen_check(m),1))

3   Pass
m=[6 3 16 11;7 14 8 5;15 1 2 4;13 9 10 12]; assert(isequal(fifteen_check(m),1))

4   Pass
m=[7 3 16 11;6 14 8 5;15 1 2 4;13 9 10 12]; assert(isequal(fifteen_check(m),0))

5   Pass
m=[6 3 16 11;7 14 8 5;15 2 1 4;13 9 10 12]; assert(isequal(fifteen_check(m),0))

6   Pass
m=[6 3 11 16;7 14 8 5;15 1 2 4;13 9 10 12]; assert(isequal(fifteen_check(m),1))

7   Pass
m=[8 2 3 13;1 6 10 9;15 14 16 5;11 12 4 7]; assert(isequal(fifteen_check(m),1))

8   Pass
m=[7 2 3 13;1 6 10 9;15 14 16 5;11 12 4 8]; assert(isequal(fifteen_check(m),0))

9   Pass
m=[8 3 2 13;1 6 10 9;15 14 16 5;11 12 4 7]; assert(isequal(fifteen_check(m),0))