Cody

# Problem 1182. Hangman (easy)

Solution 1681058

Submitted on 26 Nov 2018
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

Assertion failed.

2   Fail
words={'BUZZ','COZY','DOZE','FUZZ','GAZE','HAZE','JAZZ','LAZY','SIZE','ZERO','ZONE'}; assert(isequal(hangman(words),'Z'));

Assertion failed.

3   Fail
rng default; words=unique(char('A'+randi(26,[100,3])-1),'rows'); assert(isequal(sum(any(words==hangman(cellstr(words)'),2)),max(arrayfun(@(x)sum(any(words==x,2)),'A':'Z'))));

Assertion failed.

4   Fail
rng default; words=unique(char('A'+randi(26,[200,4])-1),'rows'); assert(isequal(sum(any(words==hangman(cellstr(words)'),2)),max(arrayfun(@(x)sum(any(words==x,2)),'A':'Z'))));

Assertion failed.

5   Fail
rng default; words=unique(char('A'+randi(26,[500,5])-1),'rows'); assert(isequal(sum(any(words==hangman(cellstr(words)'),2)),max(arrayfun(@(x)sum(any(words==x,2)),'A':'Z'))));

Assertion failed.