This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
seed = 1; n=5;
y_correct = {'1';'11';'21';'1211';'111221'};
assert(isequal(lasnumber(seed,n),y_correct))
|
2 | Pass |
%%
seed = 4; n=10;
y_correct = {'4';'14';'1114';'3114';'132114';'1113122114';'311311222114';'13211321322114';'1113122113121113222114';'31131122211311123113322114'};
assert(isequal(lasnumber(seed,n),y_correct))
|
3 | Pass |
%%
seed = 22; n=5;
y_correct = {'22';'22';'22';'22';'22'}
assert(isequal(lasnumber(seed,n),y_correct))
y_correct =
'22'
'22'
'22'
'22'
'22'
|
The Hitchhiker's Guide to MATLAB
2874 Solvers
Find the largest value in the 3D matrix
1056 Solvers
147 Solvers
5113 Solvers
158 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!