Cody

# Problem 45347. Cat's paw - 01

Solution 2192382

Submitted on 4 Apr 2020
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
a={'meaw','meao-meao','mew'}; assert(isequal( cats_paw(a),'dgkswy'))

tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 5 ans = 'd' s = 14 ans = 'm' s = 17 ans = 'p'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test1 (line 2) assert(isequal( cats_paw(a),'dgkswy'))

2   Fail
a={'meaw','meao-meao','mew','meawww'} assert(isequal( cats_paw(a),'dgkswych'))

a = 1×4 cell array {'meaw'} {'meao-meao'} {'mew'} {'meawww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 5 ans = 'd' s = 14 ans = 'm' s = 17 ans = 'p' s = 23 ans = 'v'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test2 (line 2) assert(isequal( cats_paw(a),'dgkswych'))

3   Fail
a={'mew','meawww','mew-mew-mew','meawwwww','meawww-mewaww-meaawwww'} assert(isequal( cats_paw(a),'dfjoscgnrm'))

a = 1×5 cell array {'mew'} {'meawww'} {'mew-mew-mew'} {'meawwwww'} {'meawww-mewaww-meaawwww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 4 ans = 'c' s = 10 ans = 'i' s = 21 ans = 't' s = 29 ans = 'b' s = 51 ans = 'x'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test3 (line 2) assert(isequal( cats_paw(a),'dfjoscgnrm'))

4   Pass
%a={''}; %assert( isempty(cats_paw(a)))

5   Fail
a={'meaw','','meao-meao','mew','meawww'} assert(isequal( cats_paw(a),'dgkswych'))

a = 1×5 cell array {'meaw'} {0×0 char} {'meao-meao'} {'mew'} {'meawww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 5 ans = 'd' s = 5 ans = 'd' s = 14 ans = 'm' s = 17 ans = 'p' s = 23 ans = 'v'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test5 (line 2) assert(isequal( cats_paw(a),'dgkswych'))

6   Fail
a={'meawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'} assert(isequal( cats_paw(a),'de'))

a = 1×1 cell array {'meawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 55 ans = 'b'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test6 (line 2) assert(isequal( cats_paw(a),'de'))

7   Fail
a={'meaw','meao-meao','mew','','','','meawww',''} assert(isequal( cats_paw(a),'dgkswych'))

a = 1×8 cell array {'meaw'} {'meao-meao'} {'mew'} {0×0 char} {0×0 char} {0×0 char} {'meawww'} {0×0 char} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' s = 5 ans = 'd' s = 14 ans = 'm' s = 17 ans = 'p' s = 17 ans = 'p' s = 17 ans = 'p' s = 17 ans = 'p' s = 23 ans = 'v' s = 23 ans = 'v'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test7 (line 2) assert(isequal( cats_paw(a),'dgkswych'))

### Community Treasure Hunt

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

Start Hunting!