Cody

Solution 1239469

Submitted on 26 Jul 2017 by Augusto Mazzei
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))

Go = [] s1 = 'matlabcentralm' Go = [] s1 = 'atlabcentralma' Go = [] s1 = 'tlabcentralmat' Go = [] s1 = 'labcentralmatl' Go = [] s1 = 'abcentralmatla' Go = [] s1 = 'bcentralmatlab' Go = 4 ans = logical 1

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

Go = [] s1 = 'altabcentralma' Go = [] s1 = 'ltabcentralmal' Go = [] s1 = 'tabcentralmalt' Go = [] s1 = 'abcentralmalta' Go = [] s1 = 'bcentralmaltab' Go = [] s1 = 'centralmaltabc' Go = [] s1 = 'entralmaltabce' Go = [] s1 = 'ntralmaltabcen' Go = [] s1 = 'tralmaltabcent' Go = [] s1 = 'ralmaltabcentr' Go = [] s1 = 'almaltabcentra' Go = [] s1 = 'lmaltabcentral' Go = [] s1 = 'maltabcentralm' Go = [] ans = logical 0

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

Go = [] s1 = 'cooldrinksc' Go = [] s1 = 'ooldrinksco' Go = [] s1 = 'oldrinkscoo' Go = [] s1 = 'ldrinkscool' Go = [] s1 = 'drinkscoold' Go = [] s1 = 'rinkscooldr' Go = [] s1 = 'inkscooldri' Go = [] s1 = 'nkscooldrin' Go = [] s1 = 'kscooldrink' Go = [] s1 = 'scooldrinks' Go = [] ans = logical 0

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

Go = [] s1 = 'controlsystemc' Go = [] s1 = 'ontrolsystemco' Go = [] s1 = 'ntrolsystemcon' Go = [] s1 = 'trolsystemcont' Go = [] s1 = 'rolsystemcontr' Go = [] s1 = 'olsystemcontro' Go = [] s1 = 'lsystemcontrol' Go = 2 ans = logical 1

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

Go = [] s1 = 'controlsystemc' Go = [] s1 = 'ontrolsystemco' Go = [] s1 = 'ntrolsystemcon' Go = [] s1 = 'trolsystemcont' Go = [] s1 = 'rolsystemcontr' Go = [] s1 = 'olsystemcontro' Go = [] s1 = 'lsystemcontrol' Go = [] s1 = 'systemcontrols' Go = [] s1 = 'ystemcontrolsy' Go = [] s1 = 'stemcontrolsys' Go = [] s1 = 'temcontrolsyst' Go = [] s1 = 'emcontrolsyste' Go = [] s1 = 'mcontrolsystem' Go = [] ans = logical 0