Cody

# Problem 2512. longest common semi-substring

Solution 486872

Submitted on 15 Aug 2014 by Guillaume
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
%% a = 'cat'; b = 'cat' y_correct = 3; assert(isequal(str(a,b),y_correct))

b = cat

2   Pass
%% a = 'cat'; b = 'cut' y_correct = 3; assert(isequal(str(a,b),y_correct))

b = cut

3   Pass
%% a = 'president'; b = 'precedent' y_correct = 9; assert(isequal(str(a,b),y_correct))

b = precedent

4   Pass
%% a = 'katy perry'; b = 'qqa^%^%rrrrRR' y_correct = 8; assert(isequal(str(a,b),y_correct))

b = qqa^%^%rrrrRR

5   Pass
%% a = 'cody was down for a while'; b = '12w123456789o88888888899' y_correct = 11; assert(isequal(str(a,b),y_correct))

b = 12w123456789o88888888899

6   Pass
%% a = 'cat'; b = 'dog and other pets' y_correct = 0; assert(isequal(str(a,b),y_correct))

b = dog and other pets

7   Pass
%% a = 'cat'; b = 'aca' y_correct = 2; assert(isequal(str(a,b),y_correct))

b = aca

8   Pass
%% a = 'apparently nothing in common'; b = 'zzzz zz zzzz' y_correct = 4; assert(isequal(str(a,b),y_correct))

b = zzzz zz zzzz