Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [2 5 1 2 4 1 1 3];
correct = [5 5 2 1 1 1 1 3];
assert(isequal(correct, RevCountSeq(x)));
ans =
2 1 4 1
5 2 1 3
ans =
5 5 2 1 1 1 1 3
|
2 | Pass |
%%
x = [1 9];
correct = [9];
assert(isequal(correct, RevCountSeq(x)));
ans =
1
9
ans =
9
|
3 | Pass |
%%
x = [9 1];
correct = ones(1,9);
assert(isequal(correct, RevCountSeq(x)));
ans =
9
1
ans =
1 1 1 1 1 1 1 1 1
|
4 | Pass |
%%
x = [1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9];
correct = 1:9;
assert(isequal(correct, RevCountSeq(x)));
ans =
1 1 1 1 1 1 1 1 1
1 2 3 4 5 6 7 8 9
ans =
1 2 3 4 5 6 7 8 9
|
Return the largest number that is adjacent to a zero
3106 Solvers
What is the next step in Conway's Life?
422 Solvers
Set some matrix elements to zero
228 Solvers
Check if number exists in vector
2304 Solvers
439 Solvers