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 Solvers1208
Suggested Problems
-
Get the area codes from a list of phone numbers
1062 Solvers
-
How to find the position of an element in a vector without using the find function
2747 Solvers
-
Reverse the Words (not letters) of a String
450 Solvers
-
Check if number exists in vector
12244 Solvers
-
2073 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!