Cody

Problem 269. Find Rotated Substring

Solution 3008536

Submitted on 30 Sep 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))

Error in solution: Line: 6 Column: 37 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 6 Column: 37 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 6 Column: 37 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 6 Column: 37 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

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

Error in solution: Line: 6 Column: 37 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!