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 |
list = {'Barney Google','Snuffy Smith','Dagwood Bumstead'};
alpha_list = {'Dagwood Bumstead','Barney Google','Snuffy Smith'}
assert(isequal(alphabetize(list),alpha_list))
alpha_list =
1×3 cell array
{'Dagwood Bumstead'} {'Barney Google'} {'Snuffy Smith'}
b =
1×3 cell array
{[7]} {[7]} {[8]}
a =
0×0 empty cell array
l =
3
s =
7
s =
7
s =
8
|
2 | Pass |
list = {'Harry Truman'
'Dwight Eisenhower'
'John F. Kennedy'
'Lyndon Johnson'
'Richard Nixon'
'Gerald Ford'
'Cleve Moler'
'Ronald Reagan'
'George Bush'
'Bill Clinton'
'George Bush'
'Barack Obama'};
alpha_list = {'George Bush'
'George Bush'
'Bill Clinton'
'Dwight Eisenhower'
'Gerald Ford'
'Lyndon Johnson'
'John F. Kennedy'
'Cleve Moler'
'Richard Nixon'
'Barack Obama'
'Ronald Reagan'
'Harry Truman'}
assert(isequal(alphabetize(list),alpha_list))
alpha_list =
12×1 cell array
{'George Bush' }
{'George Bush' }
{'Bill Clinton' }
{'Dwight Eisenhower'}
{'Gerald Ford' }
{'Lyndon Johnson' }
{'John F. Kennedy' }
{'Cleve Moler' }
{'Richard Nixon' }
{'Barack Obama' }
{'Ronald Reagan' }
{'Harry Truman' }
b =
12×1 cell array
{[ 6]}
{[ 7]}
{1×2 double}
{[ 7]}
{[ 8]}
{[ 7]}
{[ 6]}
{[ 7]}
{[ 7]}
{[ 5]}
{[ 7]}
{[ 7]}
a =
0×0 empty cell array
l =
12
s =
6
s =
7
s =
8
s =
7
s =
8
s =
7
s =
6
s =
7
s =
7
s =
5
s =
7
s =
7
|
Given two strings, find the maximum overlap
300 Solvers
2283 Solvers
Set some matrix elements to zero
229 Solvers
Who has power to do everything in this world?
256 Solvers
302 Solvers