Cody

Solution 2208999

Submitted on 13 Apr 2020
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
filetext = fileread('regular.m'); assert(isempty(strfind(filetext, 'for'))) assert(isempty(strfind(filetext, 'while')))

Assertion failed.

2   Fail
A = 1; B = 1; assert(isequal(regular(A),B));

board = 50 33 67 33 33 50 33 67 33 33 33 83 33 17 50 33 83 33 17 50 0 50 50 17 33 0 50 50 17 33 83 33 50 33 33 83 33 50 33 33 33 33 50 50 50 33 33 50 50 50 50 17 33 17 67 50 17 33 17 67 50 17 17 67 33 50 17 17 67 33 33 67 33 50 50 33 67 33 50 50 50 17 83 33 0 50 17 83 33 0 17 33 50 50 33 17 33 50 50 33

Output argument "B" (and maybe others) not assigned during call to "regular". Error in Test2 (line 3) assert(isequal(regular(A),B));

3   Fail
A = [2 6 5 3 5 6 3 7]; B = [1 2 3 1 3 2 2 3]; assert(isequal(regular(A),B));

board = 33 50 33 50 17 33 50 33 50 17 33 50 33 50 50 33 50 33 50 50 33 67 50 33 17 33 67 50 33 17 33 50 17 33 33 33 50 17 33 33 33 50 50 33 83 33 50 50 33 83 67 50 17 50 50 67 50 17 50 50 17 17 33 33 33 17 17 33 33 33 33 50 67 33 67 33 50 67 33 67 17 33 50 50 67 17 33 50 50 67 33 33 50 17 17 33 33 50 17 17

Output argument "B" (and maybe others) not assigned during call to "regular". Error in Test3 (line 9) assert(isequal(regular(A),B));

4   Fail
A = [10 2 4 4 2 4 5 6 8 1 6 5 10 3 9 9 9 5 5 5 9 10 3 7 8]; B = [4 1 2 2 2 1 2 4 5 1 2 2 5 1 5 3 3 3 3 3 3 4 1 4 4]; assert(isequal(regular(A),B));

board = 50 50 17 17 83 50 50 17 17 83 67 50 50 33 50 67 50 50 33 50 50 33 33 0 50 50 33 33 0 50 33 17 50 50 17 33 17 50 50 17 50 33 50 33 50 50 33 50 33 50 33 0 67 67 50 33 0 67 67 50 33 33 17 50 17 33 33 17 50 17 67 50 67 33 33 67 50 67 33 33 67 50 50 33 17 67 50 50 33 17 33 67 17 33 0 33 67 17 33 0

Output argument "B" (and maybe others) not assigned during call to "regular". Error in Test4 (line 11) assert(isequal(regular(A),B));

5   Fail
A = randi(100,80,100); B = zeros(size(A)); for iter = 1:size(A,2) [~, ~, B(:, iter)] = unique(A(:,iter)); end assert(isequal(regular(A),B));

board = 50 50 50 50 17 50 50 50 50 17 17 67 50 50 33 17 67 50 50 33 50 50 33 0 50 50 50 33 0 50 33 17 17 50 50 33 17 17 50 50 50 50 50 33 50 50 50 50 33 50 50 33 33 17 67 50 33 33 17 67 17 17 50 67 17 17 17 50 67 17 33 50 67 33 50 33 50 67 33 50 33 33 50 67 50 33 33 50 67 50 50 33 33 17 17 50 33 33 17 17

Output argument "B" (and maybe others) not assigned during call to "regular". Error in Test5 (line 6) assert(isequal(regular(A),B));