Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [1 2 3 4 5 6 7;1 2 3 4 5 6 7];
y_correct = [1;1;2;2;3;3;4;4;5;5;6;6;7;7]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
1
1
2
2
3
3
4
4
5
5
6
6
7
7
ans =
1
1
2
2
3
3
4
4
5
5
6
6
7
7
|
Find the longest sequence of 1's in a binary sequence.
3370 Solvers
235 Solvers
5011 Solvers
340 Solvers
Flip the vector from right to left
2674 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!