Cody

Solution 2120530

Submitted on 7 Feb 2020 by Andrew Tran
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' A = 1×7 string array "" "h" "l" "l" "e" "o" ""

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.' A = 1×6 string array "" "T" "i" "h" "s" "" A = 1×4 string array "" "i" "s" "" A = 1×5 string array "" "t" "h" "e" "" A = 1×7 string array "" "f" "s" "r" "i" "t" "" A = 1×6 string array "" "t" "m" "i" "e" "" A = 1×3 string array "" "I" "" A = 1×6 string array "" "h" "v" "a" "e" "" A = 1×6 string array "" "u" "e" "s" "d" "" A = 1×9 string array "" "M" "A" "L" "T" "A" "B" "." ""