Cody

Solution 539056

Submitted on 1 Dec 2014 by Jon
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))

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

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

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

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