Cody

# Problem 2143. reverse string

Solution 1846165

Submitted on 11 Jun 2019 by Joanna Lin
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 = char([97:1:122]); y_correct = char([122:-1:97]); assert(isequal(rs(x),y_correct))

z = 'abcdefghijklmnopqrstuvwxyz' y = 'z' y = 'zy' y = 'zyx' y = 'zyxw' y = 'zyxwv' y = 'zyxwvu' y = 'zyxwvut' y = 'zyxwvuts' y = 'zyxwvutsr' y = 'zyxwvutsrq' y = 'zyxwvutsrqp' y = 'zyxwvutsrqpo' y = 'zyxwvutsrqpon' y = 'zyxwvutsrqponm' y = 'zyxwvutsrqponml' y = 'zyxwvutsrqponmlk' y = 'zyxwvutsrqponmlkj' y = 'zyxwvutsrqponmlkji' y = 'zyxwvutsrqponmlkjih' y = 'zyxwvutsrqponmlkjihg' y = 'zyxwvutsrqponmlkjihgf' y = 'zyxwvutsrqponmlkjihgfe' y = 'zyxwvutsrqponmlkjihgfed' y = 'zyxwvutsrqponmlkjihgfedc' y = 'zyxwvutsrqponmlkjihgfedcb' y = 'zyxwvutsrqponmlkjihgfedcba'

2   Pass
x = 'HOW'; y_correct = 'WOH'; assert(isequal(rs(x),y_correct))

z = 'HOW' y = 'W' y = 'WO' y = 'WOH'