Cody

# Problem 61. Find state names that end with the letter A

Solution 1852406

Submitted on 18 Jun 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
s1 = 'Alabama Montana Nebraska Vermont Nevada'; s2 = ' Vermont '; assert(isequal(s2, refcn(s1)))

n = 1 ends = 7 15 24 begs = 8 16 25 33 awords = 3 new = ' Montana Nebraska Vermont Nevada' ends = 8 17 begs = 1 9 18 26 n = 2 start = 1 new = ' Nebraska Vermont Nevada' ends = 10 begs = 1 2 11 19 n = 3 start = 2 new = ' Vermont Nevada' ends = [] begs = 1 2 3 11 n = 4 new = ' Vermont ' s2 = ' Vermont '

2   Pass
s1 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota'; s2 = ' Arkansas Colorado Connecticut Delaware Hawaii Idaho Illinois Kansas Kentucky Maine Maryland Massachusetts Michigan '; assert(isequal(s2, refcn(s1)))