Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
y_correct = 0;
assert(isequal(Recaman(x),y_correct))
y =
0
|
2 | Pass |
x = 5;
y_correct = [0 1 3 6 2];
assert(isequal(Recaman(x),y_correct))
y =
0
|
3 | Pass |
x = 8;
y_correct = [0 1 3 6 2 7 13 20];
assert(isequal(Recaman(x),y_correct))
y =
0
|
4 | Pass |
x = 10;
y_correct = [0 1 3 6 2 7 13 20 12 21];
assert(isequal(Recaman(x),y_correct))
y =
0
|
5 | Pass |
x = 5e4;
y = Recaman(x);
assert(isequal(length(Recaman(x)),x))
assert(isequal(y(954),739))
assert(isequal(y(7589),17654))
assert(isequal(y(12345),18554))
y =
0
y =
0
|
6 | Pass |
x = 1e5;
y = Recaman(x);
assert(isequal(length(Recaman(x)),x))
assert(isequal(y(1e4),8658))
assert(isequal(y(2e4),34358))
assert(isequal(y(3e4),92474))
assert(isequal(y(4e4),102344))
y =
0
y =
0
|
1421 Solvers
Return elements unique to either input
550 Solvers
Getting the indices from a vector
3212 Solvers
Is this is a Tic Tac Toe X Win?
438 Solvers
664 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!