Cody

Solution 1910117

Submitted on 23 Aug 2019 at 13:15 by Marco Tullio
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 = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; y_correct = 'D'; assert(isequal(Mapp_It(A,B),y_correct))

y = 0×0 empty cell array x = 1×5 logical array 0 0 0 1 0 y = 'D'

2   Pass
A = {[] [] [] [1]; [] [1] [] []}; B = {'A','B','C','D'}; y_correct = {'D';'B'}; assert(isequal(Mapp_It(A,B),y_correct))

y = 0×0 empty cell array x = 2×4 logical array 0 0 0 1 0 1 0 0 y = 1×1 cell array {'D'} y = 2×1 cell array {'D'} {'B'}

3   Pass
A = {[] [] [1]; [] [1] []; [1] [] []}; B = {'A','B','C'}; y_correct = {'C';'B';'A'}; assert(isequal(Mapp_It(A,B),y_correct))

y = 0×0 empty cell array x = 3×3 logical array 0 0 1 0 1 0 1 0 0 y = 1×1 cell array {'C'} y = 2×1 cell array {'C'} {'B'} y = 3×1 cell array {'C'} {'B'} {'A'}