Cody

# Problem 58. Tic Tac Toe FTW

Solution 1849710

Submitted on 15 Jun 2019
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(:)))

c = int8 2 c = 1×2 int8 row vector 2 4 c = 1×3 int8 row vector 2 4 8 wins = int8 4 wins = 1×2 int8 row vector 4 8

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

c = int8 2 c = 1×2 int8 row vector 2 4 c = 1×3 int8 row vector 2 4 6 c = 1×4 int8 row vector 2 4 6 7 c = 1×5 int8 row vector 2 4 6 7 8 wins = int8 7 wins = 1×2 int8 row vector 7 8

Assertion failed.

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

c = int8 2 c = 1×2 int8 row vector 2 4 c = 1×3 int8 row vector 2 4 7 wins = int8 2 wins = 1×2 int8 row vector 2 4 wins = 1×3 int8 row vector 2 4 7

Assertion failed.

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

c = int8 4 c = 1×2 int8 row vector 4 7 c = 1×3 int8 row vector 4 7 9 wins = int8 7 wins = 1×2 int8 row vector 7 9

### Community Treasure Hunt

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

Start Hunting!