Cody

Solution 2142053

Submitted on 27 Feb 2020 by karthik raj
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))

n = 1 arr = [] arr = 1

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

n = 12 arr = [] arr = 1 arr = 1 0 arr = 1 0 -1 arr = 1 0 -1 -2 arr = 1 0 -1 -2 -3 arr = 1 0 -1 -2 -3 -4 arr = 1 0 -1 -2 -3 -4 -5 arr = 1 0 -1 -2 -3 -4 -5 -6 arr = 1 0 -1 -2 -3 -4 -5 -6 -7 arr = 1 0 -1 -2 -3 -4 -5 -6 -7 -8 arr = 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 arr = 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))

n = 25 arr = [] arr = 'a' arr = 'ab' arr = 'abl' arr = 'able' arr = 'able ' arr = 'able w' arr = 'able wa' arr = 'able was' arr = 'able was ' arr = 'able was i' arr = 'able was i ' arr = 'able was i e' arr = 'able was i er' arr = 'able was i ere' arr = 'able was i ere ' arr = 'able was i ere i' arr = 'able was i ere i ' arr = 'able was i ere i s' arr = 'able was i ere i sa' arr = 'able was i ere i saw' arr = 'able was i ere i saw ' arr = 'able was i ere i saw e' arr = 'able was i ere i saw el' arr = 'able was i ere i saw elb' arr = 'able was i ere i saw elba'

Suggested Problems

More from this Author1