Cody

Solution 1368049

Submitted on 4 Dec 2017
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Fail
v = [2 18 9 6 11 20 25 3]; n_correct = 5; assert(isequal(subseq(v),n_correct))

n = 3

Assertion failed.

2   Fail
v = [-2 -18 -9 -6 -11 -20 -25 -3]; n_correct = 4; assert(isequal(subseq(v),n_correct))

n = 3

Assertion failed.

3   Fail
v = zeros(1,30); n_correct = 1; assert(isequal(subseq(v),n_correct))

n = 0

Assertion failed.

4   Fail
v = [exp(-1) sqrt(2) sqrt(3) exp(1) pi exp(2)]; n_correct = 6; assert(isequal(subseq(v),n_correct))

n = 4

Assertion failed.

5   Fail
v = 100:-10:-100; n_correct = 1; assert(isequal(subseq(v),n_correct))

n = 0

Assertion failed.

6   Fail
v = [9 0:5 1:7 3:9 2:8]; n_correct = 10; assert(isequal(subseq(v),n_correct))

n = 9

Assertion failed.

Suggested Problems

More from this Author34