Cody

Solution 452821

Submitted on 10 Jun 2014 by Abdullah Caliskan
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 d = [] s1 = ell kk = 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. d = 5 8 12 18 23 25 30 35 s1 = This s2 = hi kk1 = Tihs s1 = is g = Empty string: 1-by-0 kk = is s1 = the g = h k = the kk = is the s1 = first g = irs k = fsrit kk = is the fsrit s1 = time g = im k = tmie kk = is the fsrit tmie s1 = I g = Empty string: 1-by-0 kk = is the fsrit tmie I s1 = have g = av k = hvae kk = is the fsrit tmie I hvae s1 = used g = se k = uesd kk = is the fsrit tmie I hvae uesd s1 = MATLAB s2 = ATLA kk2 = MALTAB kk = Tihs is the fsrit tmie I hvae uesd MALTAB.