Cody

Solution 2161991

Submitted on 16 Mar 2020 by William
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 1 2 1 2 1 1 2 2 1 2 1 2 2 1 2 2 1 1 2] assert(isequal(connect_four_4(x),2))

x = 1 1 2 1 2 1 1 2 2 1 2 1 2 2 1 2 2 1 1 2

2   Pass
x = [ 1 1 1 1 1 1 1 1; 2 2 2 2 2 2 2 2; 2 1 2 1 0 1 2 1; 1 2 1 2 1 2 1 2; 2 1 2 1 2 1 2 1; 1 2 1 2 1 2 1 1]; assert(isequal(connect_four_4(x),'invalid'))

3   Pass
x = [ 1 1 1 1 1 1 1 1; 2 2 2 2 2 2 2 2; 2 1 2 1 2 1 2 1; 1 2 1 2 1 2 1 2; 2 1 2 1 2 1 2 1; 1 2 1 2 1 2 1 1]; assert(isequal(connect_four_4(x),2))

4   Pass
x = [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 1 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1]; assert(isequal(connect_four_4(x),1))

5   Pass
x = [2 2 1 1 2 1 2 1 1 2 2 1 1 1 1 2 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 1 1 2 1 1 1 1 2 1] assert(isequal(connect_four_4(x),1))

x = 2 2 1 1 2 1 2 1 1 2 2 1 1 1 1 2 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 1 1 2 1 1 1 1 2 1

6   Pass
x = [2 2 1 1 2 1 2 1 1 2 2 2 1 1 1 2 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 1 1 2 1 1 1 1 2 1] assert(isequal(connect_four_4(x),2))

x = 2 2 1 1 2 1 2 1 1 2 2 2 1 1 1 2 1 2 1 1 1 2 2 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 2 1 1 2 2 2 2 1 1 1 2 1 2 1 2 1 1 2 1 1 1 1 2 1

Suggested Problems

More from this Author145