Cody

Solution 169454

Submitted on 28 Nov 2012 by Gwendolyn Fischer
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
a = [ 1 0 1 0 -1 0 -1 -1 1]; b = [4 8]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

ans = 4 8

2   Pass
%% a = [ 1 0 0 0 -1 0 -1 0 1]; b = [0]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

ans = Empty matrix: 0-by-1

3   Pass
%% a = [ 1 0 0 0 1 -1 1 -1 -1]; b = [2 7]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

ans = 2 7

4   Pass
%% a = [ 1 0 0 -1 1 -1 1 -1 0]; b = [7 9]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

ans = 7 9