Cody

Solution 1980154

Submitted on 17 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='I saw Count Dracula with red light of triumph in his eyes'; y_correct = 7; assert(isequal(Longest(s),y_correct))

m = 1×12 cell array {'I'} {'saw'} {'Count'} {'Dracula'} {'with'} {'red'} {'light'} {'of'} {'triumph'} {'in'} {'his'} {'eyes'} ans = 1 ans = 3 ans = 5 ans = 7 ans = 4 ans = 3 ans = 5 ans = 2 ans = 7 ans = 2 ans = 3 ans = 4

Output argument "result" (and maybe others) not assigned during call to "Longest". Error in Test1 (line 3) assert(isequal(Longest(s),y_correct))

2   Fail
s='1111 5555555 3333333333 000'; y_correct = 10; assert(isequal(Longest(s),y_correct))

m = 1×4 cell array {'1111'} {'5555555'} {'3333333333'} {'000'} ans = 4 ans = 7 ans = 10 ans = 3

Output argument "result" (and maybe others) not assigned during call to "Longest". Error in Test2 (line 3) assert(isequal(Longest(s),y_correct))

3   Fail
s='!!! 88 he was s00000 old 000'; y_correct = 6; assert(isequal(Longest(s),y_correct))

m = 1×6 cell array {'88'} {'he'} {'was'} {'s00000'} {'old'} {'000'} ans = 2 ans = 2 ans = 3 ans = 6 ans = 3 ans = 3

Output argument "result" (and maybe others) not assigned during call to "Longest". Error in Test3 (line 3) assert(isequal(Longest(s),y_correct))