Problem 61. Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A.
Example:
Input s1 = 'Alabama Montana Nebraska Vermont Nevada'; Output s2 is ' Vermont ';
Solution Stats
Problem Comments
-
10 Comments
Show
7 older comments
Bryan Lambo
on 3 Jan 2020
Be careful of the 2-word states.
Converting to different formats boggles me
Peter
on 13 Feb 2023
I don't want to go through to effort to solve such a irrelevant problem!
I will cheat!
if (s1{id}(1) == 'W' & s1{id}(end) == 't') | s1{id}(end) == 'h'
% Do nothing...
Yacine
on 5 Oct 2024
bruh matlab stands for matrix laboratory, not states with the letter A remover lmao
Solution Comments
Show commentsProblem Recent Solvers1186
Suggested Problems
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
548 Solvers
-
9514 Solvers
-
Permute diagonal and antidiagonal
463 Solvers
-
726 Solvers
-
Given a square and a circle, please decide whether the square covers more area.
1217 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!