This solution is outdated. To rescore this solution, sign in.
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_reformed =
1 0 -1 1 0 0 1 -1
0 -1 0 0 -1 0 -1 -1
0 0 1 -1 0 1 1 0
|
2 | Pass |
a = [ 1 0 0
0 1 -1
1 -1 -1];
b = [2 7];
out = ticTacToe(a);
assert(isequal(out(:), b(:)))
a_reformed =
1 0 1 1 0 0 1 1
0 1 -1 0 1 -1 1 1
0 -1 -1 1 -1 -1 -1 0
|
3 | Pass |
a = [ 1 0 0
-1 1 -1
1 -1 0];
b = [7 9];
out = ticTacToe(a);
assert(isequal(out(:), b(:)))
a_reformed =
1 -1 1 1 0 0 1 1
0 1 -1 -1 1 -1 1 1
0 -1 0 1 -1 0 0 0
|
Make the vector [1 2 3 4 5 6 7 8 9 10]
35552 Solvers
Find the longest sequence of 1's in a binary sequence.
3369 Solvers
1309 Solvers
579 Solvers
2617 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!