Cody

# Problem 269. Find Rotated Substring

Solution 1900935

Submitted on 15 Aug 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 = 'matlabcentral'; s2 = 'thecentralmatlab'; y_correct = true; assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

s1 = 'lmatlabcentra' s1 = 'almatlabcentr' s1 = 'ralmatlabcent' s1 = 'tralmatlabcen' s1 = 'ntralmatlabce' s1 = 'entralmatlabc' s1 = 'centralmatlab' s1 = 'bcentralmatla' s1 = 'abcentralmatl' s1 = 'labcentralmat' s1 = 'tlabcentralma' s1 = 'atlabcentralm' s1 = 'matlabcentral'

Output argument "y" (and maybe others) not assigned during call to "isRotatedStrPresent". Error in Test1 (line 4) assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

2   Fail
s1 = 'altabcentralm'; s2 = 'thecentralmatlab'; y_correct = false; assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

s1 = 'maltabcentral' s1 = 'lmaltabcentra' s1 = 'almaltabcentr' s1 = 'ralmaltabcent' s1 = 'tralmaltabcen' s1 = 'ntralmaltabce' s1 = 'entralmaltabc' s1 = 'centralmaltab' s1 = 'bcentralmalta' s1 = 'abcentralmalt' s1 = 'tabcentralmal' s1 = 'ltabcentralma' s1 = 'altabcentralm'

Output argument "y" (and maybe others) not assigned during call to "isRotatedStrPresent". Error in Test2 (line 4) assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

3   Fail
s1 = 'cooldrinks'; s2 = 'somecoolerdrinks'; y_correct = false; assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

s1 = 'scooldrink' s1 = 'kscooldrin' s1 = 'nkscooldri' s1 = 'inkscooldr' s1 = 'rinkscoold' s1 = 'drinkscool' s1 = 'ldrinkscoo' s1 = 'oldrinksco' s1 = 'ooldrinksc' s1 = 'cooldrinks'

Output argument "y" (and maybe others) not assigned during call to "isRotatedStrPresent". Error in Test3 (line 4) assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

4   Fail
s1 = 'controlsystem'; s2 = 'asystemcontrol'; y_correct = true; assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

s1 = 'mcontrolsyste' s1 = 'emcontrolsyst' s1 = 'temcontrolsys' s1 = 'stemcontrolsy' s1 = 'ystemcontrols' s1 = 'systemcontrol' s1 = 'lsystemcontro' s1 = 'olsystemcontr' s1 = 'rolsystemcont' s1 = 'trolsystemcon' s1 = 'ntrolsystemco' s1 = 'ontrolsystemc' s1 = 'controlsystem'

Output argument "y" (and maybe others) not assigned during call to "isRotatedStrPresent". Error in Test4 (line 4) assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

5   Fail
s1 = 'controlsystem'; s2 = 'contorlsystem'; y_correct = false; assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

s1 = 'mcontrolsyste' s1 = 'emcontrolsyst' s1 = 'temcontrolsys' s1 = 'stemcontrolsy' s1 = 'ystemcontrols' s1 = 'systemcontrol' s1 = 'lsystemcontro' s1 = 'olsystemcontr' s1 = 'rolsystemcont' s1 = 'trolsystemcon' s1 = 'ntrolsystemco' s1 = 'ontrolsystemc' s1 = 'controlsystem'

Output argument "y" (and maybe others) not assigned during call to "isRotatedStrPresent". Error in Test5 (line 4) assert(isequal(isRotatedStrPresent(s1,s2),y_correct))