Cody

Solution 1557534

Submitted on 12 Jun 2018 by Ryan Mitchell
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 0 0 -1 0 -1 0 1]; b = [0]; out = ticTacToe(a); assert(isequal(out(:), b(:)))

A = 1 0 0 1 0 0 0 0 1 A = 1 1 0 0 0 0 0 0 1 A = 1 0 0 0 0 0 0 1 1 A = 1 0 1 0 0 0 0 0 1 A = 1 0 0 0 0 1 0 0 1 wins = 0×1 empty double column vector wins = 0

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

A = 1 0 0 1 1 0 1 0 0 win A = 1 1 0 0 1 0 1 0 0 A = 1 0 1 0 1 0 1 0 0 win wins = 2 7

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

A = 1 1 0 0 1 0 1 0 0 A = 1 0 1 0 1 0 1 0 0 win A = 1 0 0 0 1 0 1 0 1 win wins = 7 9

Suggested Problems

More from this Author95