Cody

Solution 448465

Submitted on 1 Jun 2014 by Abdullah Caliskan
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(:)))

g = 2 4 8 h = -1 j = -1 2 0 -1 1 -2 2 1 h = -1 j = -1 3 -1 -1 0 -1 2 1 h = -1 j = -1 2 0 -1 0 -2 3 1

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

g = 2 4 6 7 8 h = -2 j = -2 1 0 0 1 -1 1 1 h = -2 j = -2 2 -1 0 0 0 1 1 h = -2 j = -2 1 -1 1 0 0 1 1 h = -1 j = -1 2 -1 0 0 -1 2 1 h = -2 j = -2 1 0 0 0 -1 2 1

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

g = 2 4 7 h = 2 j = 2 1 1 -1 3 0 -2 1 h = 2 j = 2 2 0 -1 2 1 -2 1 h = 3 j = 3 2 0 -1 2 0 -1 1

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

g = 4 7 9 h = 2 j = 2 2 -1 0 1 1 -1 2 h = 3 j = 3 2 -1 0 1 0 0 2 h = 2 j = 2 1 -1 1 1 0 0 3