Cody

Problem 88. It dseon't mettar waht oedrr the lrettes in a wrod are.

Solution 242375

Submitted on 10 May 2013 by andrea84
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 r = 'hlleo' r = 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. r = 'Tihs' 'is' 'the' 'first' 'time' 'I' 'have' 'used' 'MATLAB' r = 'Tihs' 'is' 'the' 'fsrit' 'time' 'I' 'have' 'used' 'MATLAB' r = 'Tihs' 'is' 'the' 'fsrit' 'tmie' 'I' 'have' 'used' 'MATLAB' r = 'Tihs' 'is' 'the' 'fsrit' 'tmie' 'I' 'hvae' 'used' 'MATLAB' r = 'Tihs' 'is' 'the' 'fsrit' 'tmie' 'I' 'hvae' 'uesd' 'MATLAB' r = 'Tihs' 'is' 'the' 'fsrit' 'tmie' 'I' 'hvae' 'uesd' 'MALTAB' r = Tihs is the fsrit tmie I hvae uesd MALTAB