Cody

Solution 1808707

Submitted on 7 May 2019 by Rajpurohith Urmila
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
sIn = 'hello' sOut = 'hlleo' assert(isequal(scrambleText(sIn),sOut))

sIn = 'hello' sOut = 'hlleo' y = 1×1 cell array {'hello'} z = 1 p = [] l = 'hello' m = 5 l = 'hlleo' p = 1×1 cell array {'hlleo'} sOut = 'hlleo'

2   Pass
sIn = 'This is the first time I have used MATLAB.' sOut = 'Tihs is the fsrit tmie I hvae uesd MALTAB.' assert(isequal(scrambleText(sIn),sOut))

sIn = 'This is the first time I have used MATLAB.' sOut = 'Tihs is the fsrit tmie I hvae uesd MALTAB.' y = 1×9 cell array {'This'} {'is'} {'the'} {'first'} {'time'} {'I'} {'have'} {'used'} {'MATLAB.'} z = 9 p = [] l = 'This' m = 4 l = 'Tihs' p = 1×1 cell array {'Tihs'} sOut = 'Tihs' l = 'is' m = 2 l = 'is' p = 1×2 cell array {'Tihs'} {'is'} sOut = 'Tihs is' l = 'the' m = 3 l = 'the' p = 1×3 cell array {'Tihs'} {'is'} {'the'} sOut = 'Tihs is the' l = 'first' m = 5 l = 'fsrit' p = 1×4 cell array {'Tihs'} {'is'} {'the'} {'fsrit'} sOut = 'Tihs is the fsrit' l = 'time' m = 4 l = 'tmie' p = 1×5 cell array {'Tihs'} {'is'} {'the'} {'fsrit'} {'tmie'} sOut = 'Tihs is the fsrit tmie' l = 'I' m = 1 l = 'I' p = 1×6 cell array {'Tihs'} {'is'} {'the'} {'fsrit'} {'tmie'} {'I'} sOut = 'Tihs is the fsrit tmie I' l = 'have' m = 4 l = 'hvae' p = 1×7 cell array {'Tihs'} {'is'} {'the'} {'fsrit'} {'tmie'} {'I'} {'hvae'} sOut = 'Tihs is the fsrit tmie I hvae' l = 'used' m = 4 l = 'uesd' p = 1×8 cell array {'Tihs'} {'is'} {'the'} {'fsrit'} {'tmie'} {'I'} {'hvae'} {'uesd'} sOut = 'Tihs is the fsrit tmie I hvae uesd' l = 'MATLAB.' m = 7 l = 'MALTAB.' p = 1×9 cell array {'Tihs'} {'is'} {'the'} {'fsrit'} {'tmie'} {'I'} {'hvae'} {'uesd'} {'MALTAB.'} sOut = 'Tihs is the fsrit tmie I hvae uesd MALTAB.'

Suggested Problems

More from this Author95