Cody

Solution 1976826

Submitted on 15 Oct 2019 by Khanh Le Quang
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
s1 = 'Jack and Jill went up the hill'; s2 = 'Jck nd Jll wnt p th hll'; assert(isequal(s2,refcn(s1)))

var = 30 num = 0 num = 1 s2 = 'J' num = 2 s2 = 'Jc' num = 3 s2 = 'Jck' num = 4 s2 = 'Jck ' num = 5 s2 = 'Jck n' num = 6 s2 = 'Jck nd' num = 7 s2 = 'Jck nd ' num = 8 s2 = 'Jck nd J' num = 9 s2 = 'Jck nd Jl' num = 10 s2 = 'Jck nd Jll' num = 11 s2 = 'Jck nd Jll ' num = 12 s2 = 'Jck nd Jll w' num = 13 s2 = 'Jck nd Jll wn' num = 14 s2 = 'Jck nd Jll wnt' num = 15 s2 = 'Jck nd Jll wnt ' num = 16 s2 = 'Jck nd Jll wnt p' num = 17 s2 = 'Jck nd Jll wnt p ' num = 18 s2 = 'Jck nd Jll wnt p t' num = 19 s2 = 'Jck nd Jll wnt p th' num = 20 s2 = 'Jck nd Jll wnt p th ' num = 21 s2 = 'Jck nd Jll wnt p th h' num = 22 s2 = 'Jck nd Jll wnt p th hl' num = 23 s2 = 'Jck nd Jll wnt p th hll'

2   Pass
s1 = 'I don''t want to work. I just want to bang on the drum all day.'; s2 = ' dn''t wnt t wrk. jst wnt t bng n th drm ll dy.'; assert(isequal(s2,refcn(s1)))

var = 62 num = 0 num = 1 s2 = ' ' num = 2 s2 = ' d' num = 3 s2 = ' dn' num = 4 s2 = ' dn'' num = 5 s2 = ' dn't' num = 6 s2 = ' dn't ' num = 7 s2 = ' dn't w' num = 8 s2 = ' dn't wn' num = 9 s2 = ' dn't wnt' num = 10 s2 = ' dn't wnt ' num = 11 s2 = ' dn't wnt t' num = 12 s2 = ' dn't wnt t ' num = 13 s2 = ' dn't wnt t w' num = 14 s2 = ' dn't wnt t wr' num = 15 s2 = ' dn't wnt t wrk' num = 16 s2 = ' dn't wnt t wrk.' num = 17 s2 = ' dn't wnt t wrk. ' num = 18 s2 = ' dn't wnt t wrk. ' num = 19 s2 = ' dn't wnt t wrk. j' num = 20 s2 = ' dn't wnt t wrk. js' num = 21 s2 = ' dn't wnt t wrk. jst' num = 22 s2 = ' dn't wnt t wrk. jst ' num = 23 s2 = ' dn't wnt t wrk. jst w' num = 24 s2 = ' dn't wnt t wrk. jst wn' num = 25 s2 = ' dn't wnt t wrk. jst wnt' num = 26 s2 = ' dn't wnt t wrk. jst wnt ' num = 27 s2 = ' dn't wnt t wrk. jst wnt t' num = 28 s2 = ' dn't wnt t wrk. jst wnt t ' num = 29 s2 = ' dn't wnt t wrk. jst wnt t b' num = 30 s2 = ' dn't wnt t wrk. jst wnt t bn' num = 31 s2 = ' dn't wnt t wrk. jst wnt t bng' num = 32 s2 = ' dn't wnt t wrk. jst wnt t bng ' num = 33 s2 = ' dn't wnt t wrk. jst wnt t bng n' num = 34 s2 = ' dn't wnt t wrk. jst wnt t bng n ' num = 35 s2 = ' dn't wnt t wrk. jst wnt t bng n t' num = 36 s2 = ' dn't wnt t wrk. jst wnt t bng n th' num = 37 s2 = ' dn't wnt t wrk. jst wnt t bng n th ' num = 38 s2 = ' dn't wnt t wrk. jst wnt t bng n th d' num = 39 s2 = ' dn't wnt t wrk. jst wnt t bng n th dr' num = 40 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm' num = 41 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm ' num = 42 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm l' num = 43 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm ll' num = 44 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm ll ' num = 45 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm ll d' num = 46 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm ll dy' num = 47 s2 = ' dn't wnt t wrk. jst wnt t bng n th drm ll dy.'