Cody

Solution 245200

Submitted on 16 May 2013 by John Doe
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

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 = 'Dagwood Bumstead' 'Barney Google' 'Snuffy Smith' lastnames = 'Google' 'Smith' 'Bumstead' C = 'Bumstead' 'Google' 'Smith' ia = 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 = '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' lastnames = 'Truman' 'Eisenhower' 'Kennedy' 'Johnson' 'Nixon' 'Ford' 'Moler' 'Reagan' 'Bush' 'Clinton' 'Bush' 'Obama' C = 'Bush' 'Bush' 'Clinton' 'Eisenhower' 'Ford' 'Johnson' 'Kennedy' 'Moler' 'Nixon' 'Obama' 'Reagan' 'Truman' ia = 9 11 10 2 6 4 3 7 5 12 8 1