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 Solvers1210
Suggested Problems
-
43574 Solvers
-
Replace NaNs with the number that appears to its left in the row.
3017 Solvers
-
Given two arrays, find the maximum overlap
1609 Solvers
-
694 Solvers
-
14718 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!