Cody

Solution 1879302

Submitted on 19 Jul 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
vec = [2 2 1 2 3 4 1 2]; out = [2 2 1 2 1 2]; assert(isequal(removeSingle(vec),out))

Output argument "ans" (and maybe others) not assigned during call to "removeSingle". Error in Test1 (line 3) assert(isequal(removeSingle(vec),out))

2   Fail
vec = ones(1,10000); out = vec; assert(isequal(removeSingle(vec),out))

Output argument "ans" (and maybe others) not assigned during call to "removeSingle". Error in Test2 (line 3) assert(isequal(removeSingle(vec),out))

3   Fail
vec = []; out = []; assert(isequal(removeSingle(vec),out))

Output argument "ans" (and maybe others) not assigned during call to "removeSingle". Error in Test3 (line 3) assert(isequal(removeSingle(vec),out))

4   Fail
vec = [1 2 3 4 5]; out = []; assert(isequal(removeSingle(vec),out))

Output argument "ans" (and maybe others) not assigned during call to "removeSingle". Error in Test4 (line 3) assert(isequal(removeSingle(vec),out))

5   Fail
vec = [4 4 5 5 1 1 2 2]; out = vec; assert(isequal(removeSingle(vec),out))

Output argument "ans" (and maybe others) not assigned during call to "removeSingle". Error in Test5 (line 3) assert(isequal(removeSingle(vec),out))

6   Fail
vec = [4 1 4]; out = [4 4]; assert(isequal(removeSingle(vec),out))

Output argument "ans" (and maybe others) not assigned during call to "removeSingle". Error in Test6 (line 3) assert(isequal(removeSingle(vec),out))

7   Pass
s = evalc('type removeSingle'); if (~isempty(regexp(s,'for'))) | (~isempty(regexp(s,'while'))) | (~isempty(regexp(s,'assert'))) | (~isempty(regexp(s,'error'))) while(1) end end