Cody

# Problem 2172. Delete the rows in the middle

Solution 1896061

Submitted on 9 Aug 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 2; 1 7; 1 8; 1 6; 1 5]; y_correct = [1 2; 1 5]; assert(isequal(delete_rows(x),y_correct))

ans = 1 1 1 1 1

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test1 (line 3) assert(isequal(delete_rows(x),y_correct))

2   Fail
x = [1 5;1 2;3 40;3 55;3 62;3 74;3 36]; y_correct = [1 5;1 2;3 40;3 36]; assert(isequal(delete_rows(x),y_correct))

ans = 1 1 3 3 3 3 3

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test2 (line 3) assert(isequal(delete_rows(x),y_correct))

3   Fail
x = [1 5;1 2;3 40;3 55;5 4;5 3;5 9;5 7;5 2;5 1]; y_correct = [1 5;1 2;3 40;3 55;5 4;5 1]; assert(isequal(delete_rows(x),y_correct))

ans = 1 1 3 3 5 5 5 5 5 5

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test3 (line 3) assert(isequal(delete_rows(x),y_correct))

4   Fail
x = [1 5;1 4;1 2;3 40;3 43;3 55;3 68;4 20;4 19;4 14;4 22;4 23]; y_correct = [1 5;1 2;3 40;3 68;4 20;4 23]; assert(isequal(delete_rows(x),y_correct))

ans = 1 1 1 3 3 3 3 4 4 4 4 4

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test4 (line 3) assert(isequal(delete_rows(x),y_correct))

5   Fail
x = [1 5;1 4;1 2;3 40;3 43;3 55;3 68;4 20;4 19;4 14;4 22;4 23;5 4;5 7]; y_correct = [1 5;1 2;3 40;3 68;4 20;4 23;5 4; 5 7]; assert(isequal(delete_rows(x),y_correct))

ans = 1 1 1 3 3 3 3 4 4 4 4 4 5 5

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test5 (line 3) assert(isequal(delete_rows(x),y_correct))

6   Fail
x = [99 100; 99 105; 99 102]; y_correct = [99 100; 99 102]; assert(isequal(delete_rows(x),y_correct))

ans = 99 99 99

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test6 (line 3) assert(isequal(delete_rows(x),y_correct))

7   Fail
x = [99 100;99 105;99 102;95 10;95 15;95 13;86 192;86 187;86 65]; y_correct = [99 100;99 102;95 10;95 13;86 192;86 65]; assert(isequal(delete_rows(x),y_correct))

ans = 99 99 99 95 95 95 86 86 86

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test7 (line 3) assert(isequal(delete_rows(x),y_correct))

8   Fail
x = [99 100;99 105;99 102;95 10;95 15;95 13;86 192;86 187;86 65;79 1;79 2;79 0;79 4;79 5;79 0]; y_correct = [99 100;99 102;95 10;95 13;86 192;86 65;79 1;79 0;]; assert(isequal(delete_rows(x),y_correct))

ans = 99 99 99 95 95 95 86 86 86 79 79 79 79 79 79

Output argument "y" (and maybe others) not assigned during call to "delete_rows". Error in Test8 (line 3) assert(isequal(delete_rows(x),y_correct))