Cody

# Problem 1124. String permutations on phone keyboard

Solution 307160

Submitted on 20 Aug 2013 by Alfonso Nieto-Castanon
• Size: 25
• This is the leading solution.
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
%% x = 2639; y_correct = {'amdw';'amdx';'amdy';'amdz';'amew';'amex';'amey';'amez';'amfw';'amfx';'amfy';'amfz';'andw';'andx';'andy';'andz';'anew';'anex';'aney';'anez';'anfw';'anfx';'anfy';'anfz';'aodw';'aodx';'aody';'aodz';'aoew';'aoex';'aoey';'aoez';'aofw';'aofx';'aofy';'aofz';'bmdw';'bmdx';'bmdy';'bmdz';'bmew';'bmex';'bmey';'bmez';'bmfw';'bmfx';'bmfy';'bmfz';'bndw';'bndx';'bndy';'bndz';'bnew';'bnex';'bney';'bnez';'bnfw';'bnfx';'bnfy';'bnfz';'bodw';'bodx';'body';'bodz';'boew';'boex';'boey';'boez';'bofw';'bofx';'bofy';'bofz';'cmdw';'cmdx';'cmdy';'cmdz';'cmew';'cmex';'cmey';'cmez';'cmfw';'cmfx';'cmfy';'cmfz';'cndw';'cndx';'cndy';'cndz';'cnew';'cnex';'cney';'cnez';'cnfw';'cnfx';'cnfy';'cnfz';'codw';'codx';'cody';'codz';'coew';'coex';'coey';'coez';'cofw';'cofx';'cofy';'cofz';}; assert(isequal(string_perms(x),y_correct))

### Community Treasure Hunt

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

Start Hunting!