This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
this solution
char(10*tril(ones(n))+22);
works on R2012b but fails on Cody!
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
%%
n = 2;
p = ['* ';'**'];
assert(isequal(pyramid(n),p));
Error: Assertion failed.
|
2 | Fail |
%%
n = 3;
p = ['* ';'** ';'***'];
assert(isequal(pyramid(n),p));
Error: Assertion failed.
|
3 | Fail |
%%
n = 4;
p = ['* ';'** ';'*** ';'****'];
assert(isequal(pyramid(n),p));
Error: Assertion failed.
|
4 | Fail |
%%
n = 10;
p = ['* ';
'** ';
'*** ';
'**** ';
'***** ';
'****** ';
'******* ';
'******** ';
'********* ';
'**********'];
assert(isequal(pyramid(n),p));
Error: Assertion failed.
|
Given an unsigned integer x, find the largest y by rearranging the bits in x
525 Solvers
583 Solvers
Getting the row and column location from a matrix
192 Solvers
Flag largest magnitude swings as they occur
524 Solvers
690 Solvers