it states 'one of the other' numbers, so for a = [1] it should be false
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
a = [2 3 4];
assert(isequal(isItSquared(a),true))
B =
2 3 4
B =
3 4
|
2 | Pass |
%%
a = [20:30];
assert(isequal(isItSquared(a),false))
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
21 22 23 24 25 26 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 22 23 24 25 26 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 23 24 25 26 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 24 25 26 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 25 26 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 24 26 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 24 25 27 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 24 25 26 28 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 24 25 26 27 29 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 24 25 26 27 28 30
B =
Columns 1 through 10
20 21 22 23 24 25 26 27 28 29
Column 11
30
B =
20 21 22 23 24 25 26 27 28 29
|
3 | Fail |
%%
a = [1];
assert(isequal(isItSquared(a),true))
Error: Assertion failed.
|
4 | Pass |
%%
a = [6 10 12 14 36 101];
assert(isequal(isItSquared(a),true))
B =
6 10 12 14 36 101
B =
10 12 14 36 101
|
5 | Pass |
%%
a = [6 10 12 14 101];
assert(isequal(isItSquared(a),false))
B =
6 10 12 14 101
B =
10 12 14 101
B =
6 10 12 14 101
B =
6 12 14 101
B =
6 10 12 14 101
B =
6 10 14 101
B =
6 10 12 14 101
B =
6 10 12 101
B =
6 10 12 14 101
B =
6 10 12 14
|
Check to see if a Sudoku Puzzle is Solved
232 Solvers
All your base are belong to us
425 Solvers
Getting the row and column location from a matrix
192 Solvers
Make a run-length companion vector
453 Solvers
197 Solvers