Cody

# Problem 269. Find Rotated Substring

Solution 593409

Submitted on 8 Mar 2015 by goc3
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 = 'matlabcentral'; s2 = 'thecentralmatlab'; y_correct = true; assert(isequal(isRotatedStrPresent(s1,s2),y_correct))

txt = lmatlabcentra txt = almatlabcentr txt = ralmatlabcent txt = tralmatlabcen txt = ntralmatlabce txt = entralmatlabc txt = centralmatlab

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

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

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

txt = scooldrink txt = kscooldrin txt = nkscooldri txt = inkscooldr txt = rinkscoold txt = drinkscool txt = ldrinkscoo txt = oldrinksco txt = ooldrinksc txt = cooldrinks

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

txt = mcontrolsyste txt = emcontrolsyst txt = temcontrolsys txt = stemcontrolsy txt = ystemcontrols txt = systemcontrol

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

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