Cody

# Problem 130. Space Saver

Solution 1204432

Submitted on 4 Jun 2017 by Said BOUREZG
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
x = ['mat' char(24) 'lab']; y_correct = 'matlab'; assert(isequal(lose_control(x),y_correct))

ans = 109 97 116 24 108 97 98 ans = 'matlab'

2   Pass
x = ['math' char(32) 'lab']; y_correct = 'math lab'; assert(isequal(lose_control(x),y_correct))

ans = 109 97 116 104 32 108 97 98 ans = 'math lab'

3   Pass
x = ' '; y_correct = ' '; assert(isequal(lose_control(x),y_correct))

ans = 32 32 32 ans = ' '

4   Pass
x = 'matlab'; x = regexprep(x,'tl','t\tl') y_correct = 'matlab'; assert(isequal(lose_control(x),y_correct))

x = 'mat lab' ans = 109 97 116 9 108 97 98 ans = 'matlab'

5   Pass
x = char(1:50); y_correct = char(32:50); assert(isequal(lose_control(x),y_correct))

ans = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 50 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ans = ' !"#\$%&'()*+,-./012'