Cody

# Problem 92. Find state names that start with the letter N

Solution 1941945

Submitted on 18 Sep 2019 by Charles Juenger
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 = 'North Carolina Tennessee Texas Nebraska Maine'; s2 = ' Tennessee Texas Maine'; assert(isequal(s2,refcn(s1)))

s1 = ' North Carolina Tennessee Texas Nebraska Maine ' a = 1 7 16 26 32 41 47 s1 = ' Carolina Tennessee Texas Nebraska Maine ' s1 = ' Narolina Tennessee Texas Nebraska Maine ' a = -5 1 10 20 26 35 41 s1 = ' Tennessee Texas Nebraska Maine ' a = -13 -7 2 12 18 27 33 s1 = ' Tennessee Texas Maine ' a = -21 -15 -6 4 10 19 25 s2 = ' Tennessee Texas Maine'

2   Pass
s1 = 'Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota'; s2 = ' '; assert(isequal(s2,refcn(s1)))

s1 = ' Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota ' a = 1 10 17 21 31 35 42 46 53 57 62 68 77 83 90 s1 = ' Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota ' a = -7 2 9 13 23 27 34 38 45 49 54 60 69 75 82 s1 = ' New Hampshire New Jersey New Mexico New York North Carolina North Dakota ' a = -13 -4 3 7 17 21 28 32 39 43 48 54 63 69 76 s1 = ' Hampshire New Jersey New Mexico New York North Carolina North Dakota ' s1 = ' Nampshire New Jersey New Mexico New York North Carolina North Dakota ' a = -17 -8 -1 3 13 17 24 28 35 39 44 50 59 65 72 s1 = ' New Jersey New Mexico New York North Carolina North Dakota ' a = -26 -17 -10 -6 4 8 15 19 26 30 35 41 50 56 63 s1 = ' Jersey New Mexico New York North Carolina North Dakota ' s1 = ' Nersey New Mexico New York North Carolina North Dakota ' a = -30 -21 -14 -10 0 4 11 15 22 26 31 37 46 52 59 s1 = ' New Mexico New York North Carolina North Dakota ' a = -36 -27 -20 -16 -6 -2 5 9 16 20 25 31 40 46 53 s1 = ' Mexico New York North Carolina North Dakota ' s1 = ' Nexico New York North Carolina North Dakota ' a = -40 -31 -24 -20 -10 -6 1 5 12 16 21 27 36 42 49 s1 = ' New York North Carolina North Dakota ' a = -46 -37 -30 -26 -16 -12 -5 -1 6 10 15 21 30 36 43 s1 = ' York North Carolina North Dakota ' s1 = ' Nork North Carolina North Dakota ' a = -50 -41 -34 -30 -20 -16 -9 -5 2 6 11 17 26 32 39 s1 = ' North Carolina North Dakota ' a = -54 -45 -38 -34 -24 -20 -13 -9 -2 2 7 13 22 28 35 s1 = ' Carolina North Dakota ' s1 = ' Narolina North Dakota ' a = -60 -51 -44 -40 -30 -26 -19 -15 -8 -4 1 7 16 22 29 s1 = ' North Dakota ' a = -68 -59 -52 -48 -38 -34 -27 -23 -16 -12 -7 -1 8 14 21 s1 = ' Dakota ' s1 = ' Nakota ' a = -74 -65 -58 -54 -44 -40 -33 -29 -22 -18 -13 -7 2 8 15 s1 = ' ' a = -80 -71 -64 -60 -50 -46 -39 -35 -28 -24 -19 -13 -4 2 9 s2 = ' '

3   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 Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming'; s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming'; assert(isequal(s2,refcn(s1)))