Cody

Solution 1605356

Submitted on 10 Aug 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
x = [5 4 7 3 1]; y_correct = 7; assert(isequal(mostPrimes(x),y_correct));

arr = [] append = 3 arr = 3 append = 2 arr = 3 2 append = 4 arr = 3 2 4 append = 2 arr = 3 2 4 2 append = 0 arr = 3 2 4 2 0 idx = 3 ans = 7

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

arr = [] append = 3 arr = 3 append = 2 arr = 3 2 append = 0 arr = 3 2 0 idx = 1 ans = 5