Cody

Solution 1574253

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

wordstarts = 1 3 7 13 21 26 30 36 39 47 50 54 wordends = 1 5 11 19 24 28 34 37 45 48 52 57 wordlengths = 1 3 5 7 4 3 5 2 7 2 3 4 ans = 7

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

wordstarts = 1 6 14 25 wordends = 4 12 23 27 wordlengths = 4 7 10 3 ans = 10

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

wordstarts = 5 8 11 15 22 26 wordends = 6 9 13 20 24 28 wordlengths = 2 2 3 6 3 3 ans = 6