Cody

Solution 1817754

Submitted on 16 May 2019 by Chirag Dudhat
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 = 1; y_correct = 1; assert(isequal(reverseVector(x),y_correct))

h = 1 y = 1

2   Pass
x = -10:1; y_correct = 1:-1:-10; assert(isequal(reverseVector(x),y_correct))

h = 12 y = 1 h = 12 y = 1 0 h = 12 y = 1 0 -1 h = 12 y = 1 0 -1 -2 h = 12 y = 1 0 -1 -2 -3 h = 12 y = 1 0 -1 -2 -3 -4 h = 12 y = 1 0 -1 -2 -3 -4 -5 h = 12 y = 1 0 -1 -2 -3 -4 -5 -6 h = 12 y = 1 0 -1 -2 -3 -4 -5 -6 -7 h = 12 y = 1 0 -1 -2 -3 -4 -5 -6 -7 -8 h = 12 y = 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 h = 12 y = 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10

3   Pass
x = 'able was i ere i saw elba'; y_correct = 'able was i ere i saw elba'; assert(isequal(reverseVector(x),y_correct))

h = 25 y = 'a' h = 25 y = 'ab' h = 25 y = 'abl' h = 25 y = 'able' h = 25 y = 'able ' h = 25 y = 'able w' h = 25 y = 'able wa' h = 25 y = 'able was' h = 25 y = 'able was ' h = 25 y = 'able was i' h = 25 y = 'able was i ' h = 25 y = 'able was i e' h = 25 y = 'able was i er' h = 25 y = 'able was i ere' h = 25 y = 'able was i ere ' h = 25 y = 'able was i ere i' h = 25 y = 'able was i ere i ' h = 25 y = 'able was i ere i s' h = 25 y = 'able was i ere i sa' h = 25 y = 'able was i ere i saw' h = 25 y = 'able was i ere i saw ' h = 25 y = 'able was i ere i saw e' h = 25 y = 'able was i ere i saw el' h = 25 y = 'able was i ere i saw elb' h = 25 y = 'able was i ere i saw elba'