Cody

Solution 1770005

Submitted on 2 Apr 2019 by Abdelfatah Teamah
  • Size: 7
  • This is the leading solution.
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 = {1 2 3 4 5}; y_correct=1; assert(isequal(through_list(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint1 (line 3) In solutionTest (line 3)]

2   Pass
x = {1 2 3 4 5 6 7 8 9 10 9}; assert(isequal(through_list(x),0))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint2 (line 2) In solutionTest (line 5)]

3   Pass
x = {0 1 2 3 4 5 [5 5 5 6]}; assert(isequal(through_list(x),1))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint3 (line 2) In solutionTest (line 7)]

4   Pass
x = {[1 2] 4 [4 5] 6}; assert(isequal(through_list(x),1))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint4 (line 2) In solutionTest (line 9)]

5   Pass
assert(isequal(through_list({[1 2] 0 [4 5] 6} ),0))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint5 (line 1) In solutionTest (line 11)]

6   Pass
x = {[-2 -2 0 1] 2 3 4 5}; assert(isequal(through_list(x),1))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint6 (line 2) In solutionTest (line 13)]

7   Pass
{[10 1] [2 3] [4 40] [1 1 2 2 2 5] 6 40 [1:41] [1:42]}; assert(isequal(through_list(ans),1))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint7 (line 2) In solutionTest (line 15)]

8   Pass
{[10 1] [2 3] [4 40] [1 1 2 2 2 5] 6 40 [1:41] [1:12]}; assert(isequal(through_list(ans),0))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint8 (line 2) In solutionTest (line 17)]

9   Pass
{[-10:1:10] [2 3] [4 40] [1 1 2 2 2 5] 6 40 [1:41] [1:12]}; assert(isequal(through_list(ans),0))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint9 (line 2) In solutionTest (line 19)]

10   Pass
assert(isequal(through_list({[-10:1:10] [2 3] [4 40] [1 1 2 2 2 5 100 1000 -100] 6 [5 40 200 210] [1:41] [10:52]}),1))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint10 (line 1) In solutionTest (line 21)]

11   Pass
assert(isequal(through_list({[-10:1:10] [2 3] [4 40] [1 1 2 2 2 5 100 1000 -100] 6 [5 40 200 210] [1:41] [10:52] 53 [1001 54] [1 2 3 4 5 55]}),1))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In through_list (line 2) In ScoringEngineTestPoint11 (line 1) In solutionTest (line 23)]

Suggested Problems