Cody

Solution 1853181

Submitted on 19 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   Fail
s1 = 'Alabama Montana Nebraska Vermont Nevada'; s2 = ' Vermont '; assert(isequal(s2, refcn(s1)))

t = 1 s2 = 'Alabama Montana Nebraska Vermont Nevada' s2 = 'Alabama Montana Nebraska Vermont Nevada' s2 = 'Alabama Montana Nebraska Vermont Nevada' s2 = 'Alabama Montana Nebraska Vermont Nevada' s2 = 'Alabama Montana Nebraska Vermont Nevada' s2 = 'Alabama Montana Nebraska Vermont Nevada' s2 = ' Montana Nebraska Vermont Nevada' s2 = ' Nebraska Vermont Nevada' s2 = ' Nebraska Vermont Nevada' s2 = ' Vermont Nevada' s2 = ' Vermont Nevada' s2 = ' Vermont Nevada' s2 = ' Vermont Nevada' s2 = ' Vermont Nevada' s2 = ' Vermont Nevada' s2 = ' Vermont Nevada'

Index exceeds the number of array elements (17). Error in refcn (line 7) if (s2(k)=='a'&&s2(k+1)==' ') Error in Test1 (line 3) assert(isequal(s2, refcn(s1)))

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

t = 1 s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota' s2 = ' Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts ...

Index exceeds the number of array elements (92). Error in refcn (line 7) if (s2(k)=='a'&&s2(k+1)==' ') Error in Test2 (line 5) assert(isequal(s2, refcn(s1)))

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

t = 1 s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = 'New York North Carolina Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' Michigan Arkansas Alabama North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' North Dakota Hawaii West Virginia New Jersey' s2 = ' New Jersey'

Index exceeds the number of array elements (22). Error in refcn (line 7) if (s2(k)=='a'&&s2(k+1)==' ') Error in Test3 (line 5) assert(isequal(s2, refcn(s1)))