Cody

# Problem 2469. Cat, Meowcat and Concatenation

Solution 2106368

Submitted on 26 Jan 2020 by Asif Newaz
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
x = {'cat','meowcat','concatenation'}; y_correct = 'cat'; assert(isequal(commonS(x),y_correct))

b = 'ca' c1 = 5 c2 = 4 m = 2 b = 'cat' c1 = 5 c2 = 4 m = 3 b = 'at' c1 = 6 c2 = 5 9

2   Pass
x = {'zzzyyyzzz','meowcat','concatenation'}; y_correct = ''; assert(isequal(commonS(x),y_correct))

b = 'zz' c1 = [] c2 = [] b = 'zzz' c1 = [] c2 = [] b = 'zzzy' c1 = [] c2 = [] b = 'zzzyy' c1 = [] c2 = [] b = 'zzzyyy' c1 = [] c2 = [] b = 'zzzyyyz' c1 = [] c2 = [] b = 'zzzyyyzz' c1 = [] c2 = [] b = 'zzzyyyzzz' c1 = [] c2 = [] b = 'zz' c1 = [] c2 = [] b = 'zzy' c1 = [] c2 = [] b = 'zzyy' c1 = [] c2 = [] b = 'zzyyy' c1 = [] c2 = [] b = 'zzyyyz' c1 = [] c2 = [] b = 'zzyyyzz' c1 = [] c2 = [] b = 'zzyyyzzz' c1 = [] c2 = [] b = 'zy' c1 = [] c2 = [] b = 'zyy' c1 = [] c2 = [] b = 'zyyy' c1 = [] c2 = [] b = 'zyyyz' c1 = [] c2 = [] b = 'zyyyzz' c1 = [] c2 = [] b = 'zyyyzzz' c1 = [] c2 = [] b = 'yy' c1 = [] c2 = [] b = 'yyy' c1 = [] c2 = [] b = 'yyyz' c1 = [] c2 = [] b = 'yyyzz' c1 = [] c2 = [] b = 'yyyzzz' c1 = [] c2 = [] b = 'yy' c1 = [] c2 = [] b = 'yyz' c1 = [] c2 = [] b = 'yyzz' c1 = [] c2 = [] b = 'yyzzz' c1 = [] c2 = [] b = 'yz' c1 = [] c2 = [] b = 'yzz' c1 = [] c2 = [] b = 'yzzz' c1 = [] c2 = [] b = 'zz' c1 = [] c2 = [] b = 'zzz' c1 = [] c2 = [] b = 'zz' c1 = [] c2 = []

3   Pass
x = {'meowcat','owl','bowl'}; y_correct = 'ow'; assert(isequal(commonS(x),y_correct))

b = 'me' c1 = [] c2 = [] b = 'meo' c1 = [] c2 = [] b = 'meow' c1 = [] c2 = [] b = 'meowc' c1 = [] c2 = [] b = 'meowca' c1 = [] c2 = [] b = 'meowcat' c1 = [] c2 = [] b = 'eo' c1 = [] c2 = [] b = 'eow' c1 = [] c2 = [] b = 'eowc' c1 = [] c2 = [] b = 'eowca' c1 = [] c2 = [] b = 'eowcat' c1 = [] c2 = [] b = 'ow' c1 = 1 c2 = 2 m = 2 b = 'owc' c1 = [] c2 = [] b = 'owca' c1 = [] c2 = [] b = 'owcat' c1 = [] c2 = [] b = 'wc' c1 = [] c2 = [] b = 'wca' c1 = [] c2 = [] b = 'wcat' c1 = [] c2 = [] b = 'ca' c1 = [] c2 = [] b = 'cat' c1 = [] c2 = [] b = 'at' c1 = [] c2 = []

4   Pass
x = {'adoga','ssdogss','ppdogppp'}; y_correct = 'dog'; assert(isequal(commonS(x),y_correct))

b = 'ad' c1 = [] c2 = [] b = 'ado' c1 = [] c2 = [] b = 'adog' c1 = [] c2 = [] b = 'adoga' c1 = [] c2 = [] b = 'do' c1 = 3 c2 = 3 m = 2 b = 'dog' c1 = 3 c2 = 3 m = 3 b = 'doga' c1 = [] c2 = [] b = 'og' c1 = 4 c2 = 4 b = 'oga' c1 = [] c2 = [] b = 'ga' c1 = [] c2 = []