Problem 66. Find the two-word state names
Given a list of states, remove all the states that have two-word names.
If
s1 = 'Alabama Montana North Carolina Vermont Nevada';
then
s2 = 'Alabama Montana Vermont Nevada';
Solution Stats
Problem Comments
-
14 Comments
I too would vote for removal from this list.
I can understand strtrim but not that in the solution there must be exactly the same amount of (say) 7 spaces between two consecutive words.
Terrible test cases. Terrible. Lazy and slumpy test cases. Needed to reverse engineer to get the problem done. Test cases need to be adjusted.
Worked first try, size 12, good problem
Solution Comments
Show commentsProblem Recent Solvers1210
Suggested Problems
-
Remove the small words from a list of words.
1528 Solvers
-
Back to basics 19 - character types
265 Solvers
-
Flip the main diagonal of a matrix
843 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
637 Solvers
-
1410 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!