Cody

# Problem 45354. Connect Four - 01

Solution 2150227

Submitted on 4 Mar 2020
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 =[2 2 1 1 2 1 2; 1 2 2 1 1 1 1; 1 2 1 1 2 2 2; 2 1 2 2 2 1 1; 1 1 2 1 2 1 1; 2 1 1 2 2 2 1]; assert(isequal(connect_four(x),1))

Undefined function 'mtimes' for input arguments of type 'cell'. Error in connect_four (line 9) p{1} = 2*{1} Error in Test1 (line 7) assert(isequal(connect_four(x),1))

2   Fail
x =[ 2 2 1 1 2 1 2 1 2 2 1 1 1 1 1 2 1 1 2 2 2 2 1 2 2 2 1 1 1 1 2 1 2 1 1 2 1 1 2 2 2 2]; assert(isequal(connect_four(x),0))

Undefined function 'mtimes' for input arguments of type 'cell'. Error in connect_four (line 9) p{1} = 2*{1} Error in Test2 (line 7) assert(isequal(connect_four(x),0))

3   Fail
x = [2 2 1 1 2 1 2 1 2 2 1 1 1 1 1 2 1 1 1 2 2 2 1 2 2 2 1 1 1 1 2 1 2 1 2 2 1 1 2 2 2 2 1 1 2 1 2 1 2]; assert(isequal(connect_four(x),1))

Undefined function 'mtimes' for input arguments of type 'cell'. Error in connect_four (line 9) p{1} = 2*{1} Error in Test3 (line 8) assert(isequal(connect_four(x),1))

4   Fail
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]; assert(isequal(connect_four(x),2))

Undefined function 'mtimes' for input arguments of type 'cell'. Error in connect_four (line 9) p{1} = 2*{1} Error in Test4 (line 8) assert(isequal(connect_four(x),2))

5   Fail
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(x),0))

Undefined function 'mtimes' for input arguments of type 'cell'. Error in connect_four (line 9) p{1} = 2*{1} Error in Test5 (line 9) assert(isequal(connect_four(x),0))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!