Cody

Solution 1005609

Submitted on 10 Oct 2016 by Mario Rossi
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
x=[2,3,4,5,6,6,6,5,4,3,2,1,0,0,1]; y=[0,0,0,0,1,2,3,3,4,4,3,3,3,2,1]; P=[x;y]'; a = [2,5,6,6,5,4,3,2,0,0]; b = [0,0,1,3,3,4,4,3,3,2]; Q=[a;b]'; assert(isequal(polygon_red(P),Q))

2   Pass
x=[3,6,6,5,4,1,0,0,0,1]; y=[0,2,3,3,4,4,3,1,0,0]; P=[x;y]'; a = [3,6,6,5,4,1,0,0]; b = [0,2,3,3,4,4,3,0]; Q=[a;b]'; assert(isequal(polygon_red(P),Q))