Test  Status  Code Input and Output 

1  Fail 
a = [ 2 1 3 4 ]
tf_correct = false;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

2  Fail 
a = [ 6 1 2
5 4 3 ]
tf_correct = true;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

3  Fail 
a = [ 1 2
3 4 ]
tf_correct = false;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

4  Fail 
a = [ 7 8 9 10
6 1 2 11
5 4 3 12
16 15 14 13 ]
tf_correct = true;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

5  Fail 
a = [ 1 2 3 2 1 ]
tf_correct = false;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

6  Fail 
a = [ 6 5 4 3 ]
tf_correct = false;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

7  Fail 
a = [ 1 2 3
4 5 6
7 8 9 ]
tf_correct = false;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

8  Fail 
a = [ 2 1 1 1 ];
tf_correct = false;
assert(isequal(isItSnaky(a),tf_correct))
a =
1 2 3 4 5
ans =
1
x1 =
1
y1 =
1
x2 =
1
y2 =
2
ans =
logical
0
x1 =
1
y1 =
2
x2 =
1
y2 =
3
ans =
logical
0
x1 =
1
y1 =
3
x2 =
1
y2 =
4
ans =
logical
0
x1 =
1
y1 =
4
x2 =
1
y2 =
5
ans =
logical
0

770 Solvers
229 Solvers
Relative ratio of "1" in binary number
250 Solvers
3853 Solvers
Mersenne Primes vs. All Primes
139 Solvers