Cody

Problem 2075. twins or duplicate

Solution 700647

Submitted on 14 Jul 2015
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
%% ListA = {'Peter PARKER (27/12/1983)', 'Bob DYLAN (24/08/1983)', 'Bryan DYLAN (24/08/1983)','Victor HUGO (27/12/1902)', 'Barby GIRL (25/12/1856)','Maria EIFEL (06/06/1666)'}; ListB = {'Pat RAYDOUE (21/12/1983)', 'Bob LEPONGE (24/08/1983)', 'Pascal LEGITIM (29/03/1983)','PETER Parquer (27/12/1983)', 'Vector HUGO (27/12/1902)'}; y_correct = {'Victor HUGO (27/12/1902)'}; assert(isequal(TwinOrDuplicate(ListA,ListB),y_correct))

Assertion failed.

2   Fail
%% ListA = {'Peter PARKER (27/12/1983)', 'Jean MARTINOT (28/04/1983)', 'Bryan DYLAN (24/08/1983)','Victor HUGO (27/12/1902)', 'Barby GIRL (25/12/1856)','Maria EIFEL (06/06/1666)','Jean MARTINOT (28/04/1983)'}; ListB = {'Jean MARTINOD (28/04/1983)','Pat RAYDOUE (21/12/1983)', 'Bob LEPONGE (24/08/1983)','Pascal LEGITIM (29/03/1983)','PETER Parquer (27/12/1983)', 'Vectir HUGO (27/12/1902)','Jena MARTINOT (28/04/1983)','MARIA EIFEL (06/06/1666)'}; y_correct = {'Jean MARTINOT (28/04/1983)','Maria EIFEL (06/06/1666)'}; assert(isequal(TwinOrDuplicate(ListA,ListB),y_correct))

Assertion failed.

3   Fail
%% ListA = {'Peter PARKER (27/12/1983)', 'Jean MARTINOT (28/04/1983)', 'Bryan DYLAN (24/08/1983)','Victor HUGO (27/12/1902)', 'Barby GIRL (25/12/1856)','Maria EIFEL (06/06/1666)'}; ListB = {'Pat RAYDOUE (21/12/1983)', 'Bob LEPONGE (24/08/1983)', 'Pascal LEGITIM (29/03/1983)','PETER Parquer (27/12/1983)', 'Vectir HUGO (27/12/1902)','Jena MARTINOT (28/04/1983)'}; y_correct = {}; assert(isempty(TwinOrDuplicate(ListA,ListB)))

Evaluation of 'persistent count;if isempty(count),count=1;else count=count+1;end;correct={[1 0 1 0 1;0 1 0 1 0;1 0 1 0 1;0 1 0 1 0;1 0 1 0 1],[1 0 1 0;0 1 0 1;1 0 1 0;0 1 0 1]};y=correct{count};' failed: Index exceeds matrix dimensions.

Community Treasure Hunt

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

Start Hunting!