Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [4 5 6 7 0 1 2];
y_correct = true;
assert(isequal(isRotaSorTED(x),y_correct))
|
2 | Pass |
x = [2 5 6 8 0 1 3];
y_correct = false;
assert(isequal(isRotaSorTED(x),y_correct))
|
3 | Pass |
x = [101, 103, 106, 109, 158, 164, 182, 187, 202, 205, 2, 3, 32, 57, 69, 74, 81, 99, 100];
y_correct = true;
assert(isequal(isRotaSorTED(x),y_correct))
|
4 | Pass |
x = [42 1:10];
y_correct = true;
assert(isequal(isRotaSorTED(x),y_correct))
|
5 | Pass |
x = 1:10;
x(1) = 100; x(4) = 1;
y_correct = false;
assert(isequal(isRotaSorTED(x),y_correct))
|
6 | Pass |
x = 10:-1:1;
y_correct = false;
assert(isequal(isRotaSorTED(x),y_correct))
|
707 Solvers
1050 Solvers
How many trades represent all the profit?
520 Solvers
Change the sign of even index entries of the reversed vector
296 Solvers
Relative ratio of "1" in binary number
392 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!