Cody

Solution 695223

Submitted on 2 Jul 2015 by goc3
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
%% C = {'Ken'; 'GianCarlo'; 'Ken'; 'GianCarlo'; 'Bob'; 'Ken'; 'Sonia'}; repeatedStrings = {'Ken'; 'GianCarlo'}; assert(isequal(extractRepeatedStrings(C), repeatedStrings))

ans = 'Ken' 'GianCarlo'

2   Pass
%% C = {'A', 'B', 'C', 'A', 'B'}; repeatedStrings = {'A'; 'B'}; assert(isequal(extractRepeatedStrings(C), repeatedStrings))

ans = 'A' 'B'

3   Pass
%% C = {'B', 'A', 'C', 'B', 'A'}; repeatedStrings = {'B'; 'A'}; assert(isequal(extractRepeatedStrings(C), repeatedStrings))

ans = 'B' 'A'

4   Pass
%% C = {'A', 'B', 'C'}; repeatedStrings = cell.empty(0, 1); assert(isequal(extractRepeatedStrings(C), repeatedStrings))

ans = Empty cell array: 0-by-1

5   Pass
%% C = {'A', 'B'; 'C', 'A'; 'B', 'A'}; repeatedStrings = {'A'; 'B'}; assert(isequal(extractRepeatedStrings(C), repeatedStrings))

ans = 'A' 'B'