Cody

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

Solution 2576661

Submitted on 18 Jun 2020 by Li Kehan Li
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)))

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)))

3   Pass
s1 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey'; s2 = 'New York Michigan Arkansas Hawaii New Jersey'; assert(isequal(s2, refcn(s1)))

x = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'Alabama'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'Alabama'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'Alabama'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'Alabama'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'Alabama'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'Alabama'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'0'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'0'} {'Hawaii'} {'New'} {'Jersey'} y = 1×8 cell array {'New'} {'York'} {'Michigan'} {'Arkansas'} {'0'} {'Hawaii'} {'New'} {'Jersey'} d = 'New' d = 'York' d = 'Michigan' d = 'Arkansas' d = 'Alabama' s1 = 'New York Michigan Arkansas Hawaii New Jersey' d = 'Hawaii' d = 'New' d = 'Jersey' s2 = 'New York Michigan Arkansas Hawaii New Jersey'

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!