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'}
lastName =
1×3 cell array
{1×1 cell} {1×1 cell} {1×1 cell}
idx =
3 1 2
|
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' }
lastName =
12×1 cell array
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
{1×1 cell}
idx =
9 11 10 2 6 4 3 7 5 12 8 1
|
Count from 0 to N^M in base N.
200 Solvers
275 Solvers
The Answer to Life, the Universe, and Everything
312 Solvers
193 Solvers
341 Solvers