Cody

Solution 1091394

Submitted on 27 Dec 2016 by James
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 = [5 6 7 8 9];y_correct = 5; assert(isequal(Sleeping(x),y_correct))

2   Pass
x = [1 5 3 2 4];y_correct = 9; assert(isequal(Sleeping(x),y_correct))

3   Pass
x = [2 4 8 4 2];y_correct = 12; assert(isequal(Sleeping(x),y_correct))

4   Pass
x = [1 1 1 2 1];y_correct = 17; assert(isequal(Sleeping(x),y_correct))

5   Pass
x = [3 6 5 1 8];y_correct = 7; assert(isequal(Sleeping(x),y_correct))

6   Pass
assert(isequal(Sleeping([1 6 1 7 8]),11))

7   Pass
assert(isequal(Sleeping([2 3 3 1 5]),10))