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
Show
11 older comments
Marco Riani
on 3 Jan 2022
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.
Mahmut Burak Cinar
on 11 Jan 2023
Terrible test cases. Terrible. Lazy and slumpy test cases. Needed to reverse engineer to get the problem done. Test cases need to be adjusted.
Brandon
on 14 Jun 2023
Worked first try, size 12, good problem
Solution Comments
Show commentsProblem Recent Solvers1208
Suggested Problems
-
Find the sum of all the numbers of the input vector
50362 Solvers
-
1792 Solvers
-
576 Solvers
-
Who is the smartest MATLAB programmer?
763 Solvers
-
Check that number is whole number
4557 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!