Cody

Solution 1981488

Submitted on 18 Oct 2019
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   Fail
s = [ 195 125 260 440 395 290]; n=570; y_correct = [125 125 125 195]; assert(isequal(buy(s,n),y_correct))

Undefined function 'fun' for input arguments of type 'double'. Error in buy (line 10) y = fun(v(2:end), target - currVal); % Recursion step Error in Test1 (line 4) assert(isequal(buy(s,n),y_correct))

2   Fail
s = [ 150 180 60 40]; n=210; y_correct = [60 150]; assert(isequal(buy(s,n),y_correct))

Undefined function 'fun' for input arguments of type 'double'. Error in buy (line 10) y = fun(v(2:end), target - currVal); % Recursion step Error in Test2 (line 4) assert(isequal(buy(s,n),y_correct))