Cody

# Problem 45347. Cat's paw - 01

Solution 2192386

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' ans = 'w' ans = 'n' ans = 'k'

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' ans = 'w' ans = 'n' ans = 'k' ans = 'e'

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' ans = 'x' ans = 'r' ans = 'g' ans = 'y' ans = 'c'

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' ans = 'w' ans = 'w' ans = 'n' ans = 'k' ans = 'e'

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' ans = 'y'

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' ans = 'w' ans = 'n' ans = 'k' ans = 'k' ans = 'k' ans = 'k' ans = 'e' ans = 'e'

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!