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'}
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In alphabetize (line 2)
In ScoringEngineTestPoint1 (line 3)
In solutionTest (line 3)]
|
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' }
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In alphabetize (line 2)
In ScoringEngineTestPoint2 (line 25)
In solutionTest (line 5)]
|
17467 Solvers
235 Solvers
Get the elements of diagonal and antidiagonal for any m-by-n matrix
267 Solvers
Reverse the elements of an array
687 Solvers
452 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!