Problem 162. High school cafeteria
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Alfonso Nieto-Castanon
on 29 Jan 2012
need to add non-sorted test samples (e.g. [3,2,1])?
Tom Holz
on 26 Feb 2013
It looks like 1 is being incorrectly sorted as a composite number in the testcases.
the cyclist
on 27 Feb 2013
I somehow Alfonso's older comment until I saw Tom's newer one.
Alfonso: I've added a non-sorted test sample, and had the problem rescored.
Tom: 1 is neither prime nor composite. I've added instructions on how to handle that.
Ned Gulley
on 20 Jun 2013
I had assumed that "in order" meant "in the order provided". If that were the case, then [5 1 3 2 4] would return [5 3 2 1 4]. Maybe you could say you want them sorted rather than in order.
Solution Comments
Show commentsProblem Recent Solvers208
Suggested Problems
-
Create a cell array out of a struct
1409 Solvers
-
7873 Solvers
-
649 Solvers
-
394 Solvers
-
3255 Solvers
More from this Author23
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!