looks like there is problem with the 2nd test case result. The 'Cleve Molar' is shifted by 1 space in the ans
This problem can be trickier if the input can allow different styles of name representation, e.g., 'FirstName LastName' and 'LastName, FirstName'.
be careful with 'John F. Kennedy' case..
The change in output format was a pain !
This blew my mind. Finally got it.
Be careful with output format...
if length(alpha_list) > 5
alpha_list = alpha_list';
end
Just don't get it. In the first test case, answer is 1xN and in the second Nx1, so I just put workaround. If anyone could explain to me why this matters...
Size 42. How it calculates the size?
What is wrong with test 2? It looks the same as my output.
I initially also found that strange. But later I found out the cell structure is different. N by 1 OR 1 by N problem.
You cheater
Task is done but Test suite is not dynamic
My crazy answer....
How?
???
Is there a bug in the Test Suite ? I made a code that resulted in the exact ideal answer but the Test has failed!?
I experienced the same thing...was able to generate the output exactly but received a failing score. Did you solve your issue?
http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
Some alternative situations are presented in Problem 44538
( www.mathworks.com/matlabcentral/cody/problems/44538 ) and Problem 44541 ( https://www.mathworks.com/matlabcentral/cody/problems/44541 ).
Simillar solutions are really cool and concise.
1374 Solvers
522 Solvers
205 Solvers
Matlab Basics - Convert a row vector to a column vector
437 Solvers
Find the sides of an isosceles triangle when given its area and height from its base to apex
474 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!