Cody

Solution 78746

Submitted on 18 Apr 2012 by James
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

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(:)))

b = 1 4 7 1 2 3 1 3 2 5 8 4 5 6 5 5 3 6 9 7 8 9 9 7

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

b = 1 4 7 1 2 3 1 3 2 5 8 4 5 6 5 5 3 6 9 7 8 9 9 7

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

b = 1 4 7 1 2 3 1 3 2 5 8 4 5 6 5 5 3 6 9 7 8 9 9 7

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

b = 1 4 7 1 2 3 1 3 2 5 8 4 5 6 5 5 3 6 9 7 8 9 9 7