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
-
3413 Solvers
-
Calculate the Levenshtein distance between two strings
1453 Solvers
-
Rotate and display numbered tile
348 Solvers
-
Create a Multiplication table matrix...
575 Solvers
-
5669 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!