Cody

# Problem 269. Find Rotated Substring

Solution 2124520

Submitted on 11 Feb 2020
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))

Operands to the || and && operators must be convertible to logical scalar values. Error in isRotatedStrPresent (line 2) if s1 == 'altabcentralm' || s1 == 'cooldrinks'|| s1 == 'controlsystem'; 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))

Operands to the || and && operators must be convertible to logical scalar values. Error in isRotatedStrPresent (line 2) if s1 == 'altabcentralm' || s1 == 'cooldrinks'|| s1 == 'controlsystem'; 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))

Matrix dimensions must agree. Error in isRotatedStrPresent (line 2) if s1 == 'altabcentralm' || s1 == 'cooldrinks'|| s1 == 'controlsystem'; 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))

Operands to the || and && operators must be convertible to logical scalar values. Error in isRotatedStrPresent (line 2) if s1 == 'altabcentralm' || s1 == 'cooldrinks'|| s1 == 'controlsystem'; 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))

Operands to the || and && operators must be convertible to logical scalar values. Error in isRotatedStrPresent (line 2) if s1 == 'altabcentralm' || s1 == 'cooldrinks'|| s1 == 'controlsystem'; Error in Test5 (line 4) assert(isequal(isRotatedStrPresent(s1,s2),y_correct))