Cody

Solution 1360850

Submitted on 28 Nov 2017 by margreet docter
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)))

a_start = 1 9 17 26 34 a_end = 7 15 24 32 39 b = 1 2 3 5 aa = [] aa = []

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

a_start = 1 9 16 24 33 44 53 65 74 82 90 97 103 112 120 125 132 141 151 157 166 180 189 a_end = 7 14 22 31 42 51 63 72 80 88 95 101 110 118 123 130 139 149 155 164 178 187 197 b = 1 2 3 5 9 10 14 15 18 23 aa = [] aa = []

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

a_start = 1 5 10 16 25 34 43 51 57 64 71 76 85 89 a_end = 3 8 14 23 32 41 49 55 62 69 74 83 87 94 b = 4 7 9 12 aa = 50 aa = 10 36