Given a list of states, remove all the states that have two-word names.
s1 = 'Alabama Montana North Carolina Vermont Nevada';
s2 = 'Alabama Montana Vermont Nevada';
The test function has some incorrect values: Nebraska and Nevada are incorrectly removed, Rhode Island, South Carolina, South Dakota and West Virginia are incorrectly left in.
I've fixed the problem and you're now the leader. Sorry about that!
A second test case is needed for this problem. 'New York Nevada' should suffice.
I added another test, similar to the one suggested. Thanks for the comment Richard!
I keep getting 'inappropriate content' errors.
"Remove inappropriate content" error...
What is " two_word name"??
if i would grasp all regexp possibilities in depth.. makes me cry
I've never cared so much about America
Inconsistent behavior - if you are going to make a question like this, make it representative of what would actual be done and not some arbitrary undocumented rules like "replace a two-word state name with a space"
did not give the list of states names
Something wrong in test 1
Add two numbers
What's Your BMI?
Create matrix of replicated elements
05 - Vector Equations 1
Create a two dimensional zero matrix
Longest Divisor Run
Remove all the consonants
It dseon't mettar waht oedrr the lrettes in a wrod are.
Knight's Tour Checker
Prime factor digits
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office